guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in documentation for eq? ?


From: David Kastrup
Subject: Re: Bug in documentation for eq? ?
Date: Wed, 20 Jun 2012 13:47:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

David Kastrup <address@hidden> writes:

> I think it is completely absurd.  It would mean, for example, that
> (memq x (list x))
> is generally unspecified.  It would mean that things like
> (eq? (car x) (car x))
> are generally unspecified even when x is a pair.

So that we can have (eq? x x) but not (eq? (car x) (car x)).

I really don't care what the standard claims.  That a Scheme object
should be able to become un-eq? to itself just because it is a number is
nonsense.  That different number expressions might or might not end up
as one object because of a lack of identity is fine.  But that a Scheme
object might split into several un-eq? identities is schizophrenic.
That would violate more invariants than anything.

It is fine if the optimizer decides not tracking the identity of
numbers.  But that means that, absent any reliable identity information,
it must declare equal numbers as eq?, not as un-eq?.

This is a one-way street.  Other options don't make sense.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]