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] 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: 2001-04-24 (07:13)
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  Archives: