From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA02647; Mon, 10 Nov 2003 19:41:57 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA02465 for ; Mon, 10 Nov 2003 19:41:56 +0100 (MET) Received: from nemerle.org (lilith.ii.uni.wroc.pl [156.17.4.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id hAAIft123286 for ; Mon, 10 Nov 2003 19:41:55 +0100 (MET) Received: from malekith by nemerle.org with local (Exim 4.24) id 1AJGyt-0001Zz-Nn; Mon, 10 Nov 2003 19:41:43 +0100 Date: Mon, 10 Nov 2003 19:41:43 +0100 From: Michal Moskal To: Jacques Garrigue Cc: oleg_trott@columbia.edu, caml-list@inria.fr Subject: Re: [Caml-list] Strange physical equality behavior Message-ID: <20031110184143.GA5971@lilith.ii.uni.wroc.pl> References: <200311091334.13734.oleg_trott@columbia.edu> <20031110103330C.garrigue@kurims.kyoto-u.ac.jp> <200311092125.36771.oleg_trott@columbia.edu> <20031110172924V.garrigue@kurims.kyoto-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031110172924V.garrigue@kurims.kyoto-u.ac.jp> User-Agent: Mutt/1.4.1i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 0900,:01 jacques:01 orderings:01 michal:01 moskal:01 malekith:01 wroclaw:01 kernel:01 equality:01 mutable:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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