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
RE: [Caml-list] Operator overloading
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-08 (20:51)
From: Brian Hurt <bhurt@j...>
Subject: Re: [Caml-list] Operator overloading
Michael Hicks wrote:

>This discussion reminds of a paper that appeared at POPL 2007 about the
>relationship between ML modules and Haskell type classes.  The former are
>really good for organizing your namespace and making dependencies and
>operations explicit.  The latter are really good at (disciplined) operator
>overloading (which is convenient as many here have argued).  The paper looks
>at how the two can be combined (essentially, operator overloading is
>implicit functor instantiation), so you can have the best of both worlds.

The reason type classes were implemented in Haskell was as a sane way to 
implement a generic equality operator.  Myself, I question the need for 
a generic equality operator.