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
Type abstraction and (polymorphic) equality
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-06-29 (13:37)
From: Christophe TROESTLER <debian00@t...>
Subject: Re: [Caml-list] Type abstraction and (polymorphic) equality
On Wed, 29 Jun 2005, Jon Harrop <> wrote:
> >   - One introduces the same capability of providing a special equality
> >     (comparison) for certain types but, during compilation, "expand"
> >     functions till the type for "=" is given by known functions
> >     (something like a "generic" equality).  I guess however that that
> >     may cause problems with separate compilation...
> Yes. It seems that this kind of thing is best done by a MLton-like
> compiler.  If this is a trade-off then I prefer OCaml's current
> position - MLton is an order of magnitude slower to compile small
> programs, no dynamic code loading, no marshalling etc.

Well I was more thinking of overloading equality in a GCaml manner
( which offers you
more, not less.  However, I do not know how much GCaml actually tries
to reduce the performance hit by compiling monomorphically whenever