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
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2010-02-04 (08:33)
From: Yoann Padioleau <padator@w...>
Subject: Re: [Caml-list] typeclasses?

On Feb 3, 2010, at 3:02 PM, Raoul Duke wrote:

> hi,


> is there a most-favored-implementation of typeclasses for OCaml?

You mean how to solve in OCaml problems people solve using type-classes
in haskell ? 
 - For Eq,  ocaml has a polymorphic = 
 - For Ord, ocaml has a polymprohic <
 - For Show, there is sexplib, json-static, ocaml Dumper
 - Otherwise there is classes and module/functors, or just passing
   record containg functions,  which can mimic sometimes what type classes provides.

If you want real type-classes in OCaml, join the long list of people begging
for Xavier-Leroy/Vouillon/Doligez/Guarrigue/real-programmers...  to implement it 
(this list of begging people usually includes people who are too 
lazy/incompetent/afraid-to-look-in-ocaml-source to implement and rely on other
busy people to do the job).

> thanks.
> _______________________________________________
> 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