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

Issue: PROCLAIM-LEXICAL



Re: KMP doesn't suggest ADDING a global lexical environment; the global
    lexical environment is already there in the GENERAL and RESTRICTED
    proposals.  He merely suggests making it not be identical to the global
    dynamic environment.  This would make a total of 4 environments, not 3.
Since this "global lexical" environment isn't to be identical with the
"global fluid" environment, then it's a "new" environment as far as
Common Lisp is concerned;  that's why I said he was "adding" something.
With respect to environments for a "free variable" reference, there are3, 
not 4, possibilities.  A lexically-bound variable isn't free, and hence 
not, I thought, of concern to this discussion [which was opened up by your 
attempt to clarify the semantics of free variables].

Have I misread anything here?  Your proposals were clearly worded enough; 
I only wanted to bring up an objection to the idea of having two totally 
distinct global environments.  I think calling it an "addition" or not
is a really minor point.


Re: . . .   I see no reason
    to impose this restriction, and I see Scheme compatibility as a big
    reason that we SHOULD allow lambda-binding variables which have global
    bindings.   . . . 
I think you misread this completely backwards.  It WASN'T that you couldn't 
lambda-bind anything that had a binding in the global environment.  It WAS 
that you couldn't lambda-bind anything that was explicitly declared or
proclaimed GLOBAL rather than SPECIAL (or LOCAL?).  

In an implementation where the global fluid environment is the same as 
the top-level environment (the standard state for virtually all deep 
and shallow bound Lisps -- but not for Lisp 1.5), then a SETting
of any variable without a dynamically intervening lambda-binding would
just make a global/top-level binding.  This would happen independently 
of whether the variable was proclaimed GLOBAL or SPECIAL.  But a variable
delcared GLOBAL would only affect the top-level binding; not any 
intermediate SPECIAL lambda-bindings.

Do you see the difference here? or does this point need more explication?


-- JonL --