[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
issue SYNTACTIC-ENVIRONMENT-ACCESS, version 5
- To: Eric Benson <email@example.com>
- Subject: issue SYNTACTIC-ENVIRONMENT-ACCESS, version 5
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Mon, 20 Mar 89 23:30 EST
- Cc: firstname.lastname@example.org, cl-compiler@SAIL.STANFORD.EDU, masinter.pa@XEROX.COM, cperdue@Sun.COM
- In-reply-to: <8903210009.AA00812@blacksox>
- Line-fold: No
Date: Mon, 20 Mar 89 16:09:38 PST
From: Eric Benson <email@example.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.
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!