Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] equality over functional value
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Fabrice Le Fessant <fabrice.le_fessant@i...>
Subject: Re: [Caml-list] equality over functional value

Personally, I think functions comparisons should always have the same
behavior. So, we have two options:

- Always raise an exception, even for f = f. This would have a cost
  for all programs, since the runtime would have to check the type of
  the value before testing for pointer equality.

- Never raise an exception. Function comparison would be closure
  comparison. Most people will never use any such comparison, and I
  don't know any already-written program whose behavior would be
  broken by this change. Even if the semantics is not clearly defined,
  it is not the first time (cf labels), and it can be seen as an
  implementation compromise...

So, I personnaly vote for the second one.


- Fabrice

-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr