[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Christophe TROESTLER <Christophe.Troestler@u...> |
| Subject: | Re: [Caml-list] Equality of functional values |
On Tue, 30 Jan 2007, Fernando Alegre <fernando@cc.gatech.edu> wrote: > > On Tue, Jan 30, 2007 at 10:01:41PM +0100, Christophe TROESTLER wrote: > > On Tue, 30 Jan 2007, Fernando Alegre <fernando@cc.gatech.edu> wrote: > > > > > > Add a new operator =. for floating-point-aware equality that works on > > > everything the way = works now. > > > > > > Would not this make everyone happy? > > > > No. > > Why not? Because, like several other people on this list, I am mostly writing numerical code and, while the behaviour w.r.t. NaN is only occasionally useful, it is good to have it as the standard (mandated by IEEE 754). See also http://caml.inria.fr/pub/ml-archives/caml-list/2001/02/bfbab5317267480356248b6e004c0eee.en.html > Because that is no good for libraries. Well, IMHO, for libraries you want to be able to declare the equality/comparison explicitely in the functions that need it (or else use a functor). On Tue, 30 Jan 2007, Fernando Alegre <fernando@cc.gatech.edu> wrote: > > Revert = to its previous behavior: first check physical then structural > > On Tue, 30 Jan 2007, Tom <tom.primozic@gmail.com> wrote: > > > > > let ( = ) x y = Pervasives.compare x y = 0 > > > > Because it fails on functions Ok. I got mislead by Fernando's comment letting us think that it was the solution to the OP problem -- but did not check the OP post. Still, I don't think Andrej Bauer concern was properly addressed: what concrete problem do you want equality of functions for? Cheers, ChriS