On 8/14/07, Mike Sperber <sperber at informatik.uni-tuebingen.de> wrote:
>
> "Mark Engelberg" <mark.engelberg at gmail.com> writes:
>
> > Reading through eqv? for records, it seems like if all the fields of a
> > record are immutable, than equivalence should be defined by
> > equivalence of the field contents.
>
> No. First off, the place for that would be `equal?', not `eqv?'. As to
> why `equal?' doesn't (and shouldn't) work this way, see:
>
> http://www.r6rs.org/r6rs-editors/2005-August/000840.html
I have three problems with referring to the discussion that went into
the common lisp standard as a proof that no reasonable eqv? for
immutable records can be found.
The first problem is that common lisp does not really care about
immutable data. There is little in the standard that treats immutable
data as anything than a possibility for optimization by a compiler in
certain situations.
The second problem is that common lisp standardized EQUALP. To me,
the idea of EQUALP (case insensitive characters) is just too weird for
me. Note the following quote from
http://www.lisp.org/HyperSpec/Issues/iss143-writeup.html
"""Kent says:
Please read this very carefully before voting in favor of it.
There were a lot of Yes votes for the last version, which I think
had some serious bugs in it. This would be a very bad issue for
us to screw up."""
This was far down in the writeup - I am not sure everybody reading the
writeup noticed Kent's comment.
The third problem is that the Henry Baker's EGAL was not defined at
the time of the common lisp standardization. To me, EGAL and EQ? are
the most intuitive equivalence predicates.
http://home.pipeline.com/~hbaker1/ObjectIdentity.html
Alexander
Received on Tue Aug 14 2007 - 05:44:13 UTC