Browse thread
[Caml-list] Suggestion for overloaded operators
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Warp <warplayer@f...> |
| Subject: | Re: [Caml-list] Suggestion for overloaded operators |
> > Helo. > > One of missing thing in Ocaml is the possibility to overload the operators > > such as + - / * = (by overloading, i mean : defining such operators for > > other types than -int- ).... > > Here's a syntactic proposal to enable this feature : > > You say nothing about the typing of static overloading (interaction with > polymorphism and type inference), and this is the crux of the matter. Actually this was only a syntactic suggestion for overload. I don't know well enough the ocaml typing algorithms to suggest the correct way to implement it and to solve problems such as : > What type would you give to: > fun a b -> a :+ b > ? Warp ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr