On Thu, 14 Aug 2008, Jim Farrand wrote:
2008/8/14 Peng Zang <[EMAIL PROTECTED]>: Out of curiosity, are there any theoretical reasons why OCaml could not be extended with type classes? They are one of my favourite features of Haskell, and I think they would really improve OCaml.
Because everything you can do with type classes you can do with monads and functors, and vice-versa. If you're thinking "hey, this would be a real nice function to have type classes for", try functorizing it. Use the features the language already has, instead of wishing for new ones.
Some things are clunky to do in functors, I agree, but the same can be said of type classes- and I'm far from convinced that type classes are innately a better idea than functors.
Brian _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs