Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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:
> Archives:
> Beginner's list:
> Bug reports: