[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Eq? issue
Michael Sperber <sperber@xxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:
>> Understood. Is there a good reason to conflate eq?-behaviour with
>> field mutability, though.
> The EQ? behavior follows from mutability---you can't have two
> mutable objects that you've created separately share the same
> storage location. That's just the way it works in R5RS.
It's rare, although possible, that objects of a type which is
otherwise immutable have meaningful identity. (The converse is
not possible of course.)
By meaningful identity I mean that programmers rely on separate
invocations of the constructor functions to produce objects which are
not EQV? or not EQ? (for these objects EQV? and EQ? are generally the
For example I've used objects with no fields at all to provide unique
tags to be used as exceptions to unwind the stack to the given point.
(This was not Scheme.)
__("< Marcin Kowalczyk