Browse thread
[Caml-list] equality over functional value
[
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: | qrczak@k... |
| Subject: | Re: [Caml-list] equality over functional value |
Fri, 20 Apr 2001 23:23:26 +0200 (MET DST), Alain Frisch <frisch@clipper.ens.fr> pisze:
> While we are about it, what is the reason for disallowing structural
> comparison over functional values (that is, comparing for instance the
> code address, then the environment) ?
It would say that (fun x -> x+1) is not equal to (fun x -> x+1).
Or maybe that it is, depending on how smart the compiler is.
And it's impossible to say whether (fun () -> 1+2) is equal to
(fun () -> 2+1).
Embedding pointer equality of immutable values into value equality
doesn't have a sane meaning.
--
__("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTĘPCZA
QRCZAK
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr