[r6rs-discuss] [Formal] Add symbol=? and boolean=?

From: <bear>
Date: Sun Feb 11 13:56:46 2007

On Sat, 10 Feb 2007, Per Bothner wrote:

> Right, but this distinction is not intrinsic to Scheme or Common
> Lisp, which was my point: A language designed from scratch would
> probably not have eq? defined on values, only on objects.

Hmmm. I think that in most implementations, if eq? were defined
only on mutable objects, it would either get slower (not that I
particularly mind slower) or continue to work as it does now on
immediate values.

I'm a little annoyed by the inconsistency of its semantics on
values. For example, the eq?ness of integers depends on whether
they are larger or smaller than the largest fixnum, and I don't
think that notion is well-defined or mathematically well-founded.
I would prefer it if programs stated simple numerical truths,
but inconsistencies like this create code whose correctness
depends on such things as implementation strategy of the scheme
system or the underlying word size.

Per's idea of making eq? undefined on values would more or less
force people to use eqv? for values - with the result that code
would have more consistent meaning across implementations and
machines.

                                        Bear
Received on Sun Feb 11 2007 - 13:56:18 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:01 UTC