Browse thread
Type abstraction and (polymorphic) equality
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Christophe TROESTLER <debian00@t...> |
| Subject: | Re: [Caml-list] Type abstraction and (polymorphic) equality |
On Wed, 29 Jun 2005, Jon Harrop <jon@ffconsultancy.com> 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 (http://www.yl.is.s.u-tokyo.ac.jp/~furuse/gcaml/) 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 possible... Cheers, ChriS