On 3 avr, 01:46, Jon Harrop <[EMAIL PROTECTED]> wrote:
> F# has an interesting solution to this problem as well. F# does away with
> functors and replaces Set.Make and Map.Make with univeral sets and maps but
> these classes derive from the universal base class "obj" and override the
> built in equality, comparison and hashing functions.
You can always have better behaviour and terse syntax by requiring
things to be built-in types (I wouldn't call this interesting), but
this doesn't scale if you cannot do the same with your own
datastructures, so how does it work in the latter case ? Note also
that sometimes you also want to be able to choose a comparison
function that differs from the one tailored to type your acting upon.
Best,
Daniel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ocaml-developer" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/ocaml-developer?hl=en
For other OCaml forums, see http://caml.inria.fr/resources/forums.en.html
-~----------~----~----~----~------~----~------~--~---