Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Yoann Padioleau <padator@wanadoo.fr>
To: Raoul Duke <raould@gmail.com>
Cc: OCaml <caml-list@inria.fr>
Subject: Re: [Caml-list] typeclasses?
Date: Thu, 4 Feb 2010 00:33:43 -0800	[thread overview]
Message-ID: <A0C94787-A51F-4707-BA0D-E7A8C4FCE844@wanadoo.fr> (raw)
In-Reply-To: <91a2ba3e1002031502h4cacea46g666f2e1db1ba2e91@mail.gmail.com>


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

> 
> hi,

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
> 




  reply	other threads:[~2010-02-04  8:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-03 23:02 typeclasses? Raoul Duke
2010-02-04  8:33 ` Yoann Padioleau [this message]
2010-02-04  8:46 ` [Caml-list] typeclasses? dmitry grebeniuk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=A0C94787-A51F-4707-BA0D-E7A8C4FCE844@wanadoo.fr \
    --to=padator@wanadoo.fr \
    --cc=caml-list@inria.fr \
    --cc=raould@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox