Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Strange physical equality behavior
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michal Moskal <malekith@p...>
Subject: Re: [Caml-list] Strange physical equality behavior
On Mon, Nov 10, 2003 at 05:29:24PM +0900, Jacques Garrigue wrote:
> The last solution is not to bother about that: I'm yet to see code
> mixing two sets of the same type but with different comparison
> functions. Sounds silly.

For me it doesn't. You cannot prevent user from shooting his foot in
this case. For example consider:

  let cmp x y = Random.int ()

This is very good comparision functions, and can also be used with
functiorial interface. You may say it is silly, but random functions 
(that are not total orderings) can be created by accident (for example
by comparing some mutable member or what's not).

-- 
: Michal Moskal :: http://www.kernel.pl/~malekith : GCS {C,UL}++++$ a? !tv
: PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners