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

EQ? non-essential?

We are still deadlocked on the 2 or 3 questions surrounding EQ?.  No
consensus is arising, except that implementations may decide on the
result of  (EQ? (LAMBDA (X) X) (LAMBDA (Y) Y)), and that characters
should have the same status as numbers.

A long argument between myself and a unnamed proponent of the ability to
test object identity resulted in the following proposal which would
make us both happy: make EQ? be a non-essential feature of the language.
Require that implementations which have it guarantee that it behave as
described in the current RRRS (e.g. (EQ? X X) would always hold).
Implementations which wish to do clever things with procedures in
violation of the implied invariant, and documentors who do not want to
be embarrassed by having something so unclean and ill-specified in such
a prominent position in the language, may simply choose to not implement
(describe) EQ?.  A denotational semantics of the essential subset would
not have to adjoin locations to numbers and procedures, although one
which wanted to describe EQ? invariants would.

If, as Sussman once pointed out to me, an "object model" of the world is
deeply embedded in S&ICP and the way Scheme is taught, then this would
be better than making (EQ? X X) be implementation-dependent, although I
would still favor the latter if EQ? were essential.

The effect of this is that while all existing implementations would stay
the same and implement EQ? as always, experimental implementations of
the language which take liberties with procedures will still be allowed
to call themselves "scheme" rather than "a variant of scheme not having
EQ?".  6.001-style courses using such implementations will have to get by
without it, somehow.

(Obviously this would also make MEMQ and ASSQ also non-essential.)