Version française
Home     About     Download     Resources     Contact us    
Browse thread
RE: "Re: [Caml-list] A G'Caml question" + additional info
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John R Harrison <johnh@i...>
Subject: RE: "Re: [Caml-list] A G'Caml question" + additional info

Markus Mottl writes:

| This is a shortcoming of the standard library that there are no
| polymorphic implementations of "Set" and similar. It's very easy to
| extract a polymorphic (module-) version from the existing code. 

I strongly agree with this point. From recent messages it seems that I'm
just one of a whole army of O'Caml users who've essentially
cut-and-pasted code out of the standard set library with a fixed
polymorphic comparison function inserted. For a polymorphic language to
make dealing with polymorphic sets so awkward seems ridiculous.

Perhaps the justification for the decision to include orderings in the
standard interface is that the default equality and orderings may not
behave as desired on arbitrary types, e.g. non-canonical abstract data
types like other sets. However, a better solution might be to make
equality on abstract types settable (see an earlier thread I started on
this topic). Will G'Caml be any help in this respect? That is, will it
allow one to "overload" equality on particular types?

John.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr