Alan Watson <alan_at_alan-watson.org> writes:
> No. Consider an implementation has multiple versions of, say,
> symbols, arranges from them to be eq? and eqv?, and also provides
> a non-standard means to distinguish them. Symbols with the same
> spelling have to be eq?, but these symbols are indeed "treated
> differently" by other (non-standard) functions.
IMHO it should not do this.
> Why would one do this? So that the reader can associate each symbol
> with its position in an input file, in order to produce better error
> messages when, for example, an unbound variable is used.
It should not use symbols to denote occurrences of variables, because
if different occurrences of the same variable are distinguishable,
then eqv? being true should mean that it's the same occurrence.
Moreover, eq? on distinguishable values should be #f. It is the
absolutely smallest equivalence relation on objects. Certain values
like numbers might yield distinct objects when they are evaluated,
so it doesn't have to appear to be reflexive, but if two values are
eq?, there must be no way to distinguish them. And eqv? on symbols
should be the same as eq?.
--
__("< Marcin Kowalczyk
\__/ qrczak_at_knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
Received on Fri Nov 24 2006 - 17:44:50 UTC