Browse thread
"OCaml gives you only monomorphic methods in classes."
[
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: | Jon Harrop <jon@f...> |
| Subject: | "OCaml gives you only monomorphic methods in classes." |
I just read this quote and I do not understand what it means: "In particular, the Hindley/Milner style of type inference used in languages such as OCaml or Haskell is incompatible with lots of assumptions of OO languages. One incompatibility is with overloading. That's why OCaml does not let you write + for both integer and floating point addition. Another incompatibility is with higher order polymorphism. That's why OCaml gives you only monomorphic methods in classes." - Martin Odersky In what way must methods be monomorphic in OCaml classes? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e