On 2011/09/01, at 6:33, Alain Frisch wrote: >> Also, for various reasons, objects are not beginner friendly. >> I think the main problem is that they don't fit that well with type >> inference: >> both subtyping and polymorphic methods require explicit type annotations. > > Time to advertise the implicit-subtyping branch?
Indeed the implicit-subtyping branch helps: if the compiler knows all the types, it doesn't force you to write a coercion by hand. On the other hand, this is only a partial solution, as my comment was on the lack of principality: you still need type annotations in many cases. Constraint-based type inference might recover this principality, but since the types inferred get even worse than with structural object types, I'm afraid this is not really practical. (It might work better with nominal subtyping.) Jacques Garrigue -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
