caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe TROESTLER <Christophe.Troestler@umh.ac.be>
To: "O'Caml Mailing List" <caml-list@inria.fr>
Subject: Re: [Caml-list] Equality of functional values
Date: Tue, 30 Jan 2007 22:46:57 +0100 (CET)	[thread overview]
Message-ID: <20070130.224657.08208845.Christophe.Troestler@umh.ac.be> (raw)
In-Reply-To: <20070130210747.GC15659@gaia.cc.gatech.edu> <c1490a380701301308s4c03112fpc450895065fed218@mail.gmail.com> <20070130204109.GB15659@gaia.cc.gatech.edu>

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


  reply	other threads:[~2007-01-30 21:47 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-29 21:04 Simon Frost
2007-01-29 21:11 ` [Caml-list] " Tom
2007-01-29 21:23   ` Brian Hurt
2007-01-29 21:59 ` Gerd Stolpmann
2007-01-30  8:17   ` Christophe Raffalli
2007-01-30  8:45   ` David MENTRE
2007-01-30 13:24 ` Andrej Bauer
2007-01-30 13:55   ` skaller
2007-01-30 14:21     ` Brian Hurt
2007-01-30 15:21     ` Jeff Polakow
2007-01-30 15:49       ` Jacques Carette
2007-01-30 17:23         ` Chris King
2007-01-30 20:18           ` Tom
2007-01-30 20:30             ` Gerd Stolpmann
2007-01-30 20:41               ` Fernando Alegre
2007-01-30 21:01                 ` Christophe TROESTLER
2007-01-30 21:08                   ` Tom
2007-01-30 21:46                     ` Christophe TROESTLER [this message]
2007-01-30 22:05                       ` Fernando Alegre
2007-01-30 23:13                         ` skaller
2007-01-30 23:06     ` Andrej Bauer
2007-01-31  0:15       ` Jacques Carette
2007-01-31  7:03         ` Stefan Monnier
2007-01-31 12:54           ` [Caml-list] " Jacques Carette
2007-01-31  0:15       ` [Caml-list] " skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070130.224657.08208845.Christophe.Troestler@umh.ac.be \
    --to=christophe.troestler@umh.ac.be \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).