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

issue SYNTACTIC-ENVIRONMENT-ACCESS, version 5



    Date: Mon, 20 Mar 89 16:09:38 PST
    From: Eric Benson <eb@lucid.com>

    This doesn't provide a way to distinguish pervasively SPECIAL
    (proclaimed) variables from locally SPECIAL (declared) variables.
    This is important because new bindings of names which are pervasively
    SPECIAL are special bindings, while new bindings of names which are
    locally SPECIAL (except those to which the declaration is attached)
    are lexical bindings.  

Good point.

			   This is just the sort of thing a code walker
    should do correctly.  I propose that instead of VARIABLE-INFORMATION
    returning :SPECIAL as the first value, it should return
    :PROCLAIMED-SPECIAL or :DECLARED-SPECIAL.

If PROCLAIM-LEXICAL passes, the same issue will arise for LEXICAL.  I
suggest that either the global binding type be returned as an additional
value, or that the programmer be reminded that the global binding type
may differ from the local one and can be retrieved by calling
VARIABLE-INFORMATION again with a null lexical environment.

    I would be happier if this difference between SPECIAL proclamations
    and SPECIAL declarations were removed.  Does anyone have an opinion on
    this?  I guess it's too late for another cleanup issue.

Removing that difference would be a disaster, since if you made SPECIAL
proclamations shadowable by bindings there would be no way to express
DEFVAR in terms of other constructs, and if you made SPECIAL
declarations not shadowable by bindings the scoping rules for
declarations would be inconsistent, unless you made all declarations not
shadowable by bindings, in which case (surprise!) you would be back to
the declaration scoping rules of Maclisp and ZetaLisp, which back in
1982 when all this was designed were considered terrible.
Vive la difference!