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

Status of declare UNSPECIAL



    Date: Fri, 25 Jul 86 11:09 EDT
    From: Daniel L. Weinreb <DLW@QUABBIN.SCRC.Symbolics.COM>

    For the record, I also remember that we decided explicitly not to have
    an "UNSPECAL" (whatever you call it) declaration, and I also don't
    remember why.  Unfortunately, I remember this discussing occurring
    during a physical meeting, but someone should poke into the old archives
    and see if there was any good reasoning that we should all know about.
    Otherwise, I agree that there should be such a declaration.

I don't remember either, but here is my guess.  Maclisp and Zetalisp 
declaration scoping follows essentially the rules proposed by Bawden, in
which all declarations are pervasive, and therefore they need UNSPECIAL.
Once you switch to the current Common Lisp rules, in which a binding
of a variable shadows a SPECIAL declaration of the same name in an outer
contour, and creates a lexical binding rather than a special binding, you
no longer need an UNSPECIAL declaration to get that lexical binding.

UNSPECIAL was probably removed because of the mistaken argument that
the above implies that UNSPECIAL is never needed.  It is still possible
to concoct more complicated situations where UNSPECIAL would not be a
no-op in the current Common Lisp rules, which I think all involve UNSPECIAL
applying to references rather than to a binding.  Also of course UNSPECIAL
is the only way to shadow a SPECIAL proclamation, but perhaps it was
considered undesirable to allow that.

Among the declaration types listed in chapter 9, the only ones that
cannot be turned off by another declaration are SPECIAL, IGNORE, and
DECLARATION.

I'm not taking a stand on whether UNSPECIAL should or should not be included
in the language, especially not until we have settled the scoping rules
for declarations, but I thought the above facts and conjectures might
be interesting.