Browse thread
polymorphic equality and overloading
[
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: | Eijiro Sumii <sumii@s...> |
| Subject: | polymorphic equality and overloading |
Dear Caml Developers/Users, (sorry that I don't know French) This might be an FAQ, but could someone please give a rationale to the polymorphic (in)equalities such as = and < in Caml? While they have a parametric polymorphic type 'a -> 'a -> bool, their semantics is ad hoc rather than parametric with respect to the type 'a (for example, they are undefined for functions), which I found confusing to some users---at least, a friend of mine was confused, and chose Haskell (which has type classes) over Caml! // Eijiro Sumii <sumii@saul.cis.upenn.edu> // // currently visiting: Department of Computer and Information Science, // School of Engineering and Applied Science, University of Pennsylvania