English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
What is a future of ocaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-01-14 (15:39)
From: David Allsopp <dra-news@m...>
Subject: RE: [Caml-list] What is a future of ocaml?
Dawid Toton wrote:
> Could anybody explain why it's impossible to have type classes in OCaml?

I don't think it's impossible - but I believe that if you introduce type
classes then you "damage" Hindley-Milner type inference and you can no
longer derive a principal typing for an arbitrary ML expression without
resorting to type annotations. Whether this is a problem or not is a matter
of taste - but it does make the language harder to call "ML" if you lose one
of its central features! That said, there are of course two big features
(objects and polymorphic variants) in OCaml already which do require