Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2003-11-10 (18:41)
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 = ()

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 :: : GCS {C,UL}++++$ a? !tv
: PLD Linux ::::::::: Wroclaw University, CS Dept : {E-,w}-- {b++,e}>+++ h

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: