[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: PROCLAIM-LEXICAL
- To: Kent M Pitman <KMP@STONY-BROOK.SCRC.Symbolics.COM>
- Subject: Re: Issue: PROCLAIM-LEXICAL
- From: masinter.PA@Xerox.COM
- Date: 28 Apr 87 22:02:51 PDT
- Cc: CL-Cleanup@SAIL.STANFORD.EDU, JAR@AI.AI.MIT.EDU
- In-reply-to: KMP@STONY-BROOK.SCRC.Symbolics.COM's message of Tue, 28 Apr 87 18:52 EDT, <870428185220.1.KMP@RIO-DE-JANEIRO.SCRC.Symbolics.COM>
Jonathan left out the alternative that I thought most natural, namely
that otherwise undeclared
variables were not an error, but would default lexical. E.g.,
(setq x 3)
(defun frob () (incf x))
would not be an error, but would always refer to the lexically global x.
This would bring variable scoping in line with function scoping when
there were no declarations. (A state of grace.)
I presume that Kent didn't really mean to propose that the global
lexical environment be different from the global dynamic environment,
but that was just an awkward artifact of his sample implementation.
The only idiom which might have portability problems are dynamic calls
to EVAL that get the dynamic binding, e.g., instead of using
SYMBOL-VALUE, e.g., user has a data base of permutations of variables &
values, and also of expressions, binds the variables with PROGV and then
evaluates the expressions.
While current practice is that compilers will warn about undeclared free
references, I know of no interpreter that does, do you?