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

issue PROCLAIM-LEXICAL



re: 
	... provided that we can guarantee that you would never have to
	access the symbol's global value when there is a special binding of
	the variable.  I believe this was the purpose of the amendment that
    . . . 

    I believe that the reason people have this goal is not at all an issue
    of desired language semantics, but instead that they believe it would be
    too difficult in a shallow-bound implementation to allow access to the
    global value in the presence of special bindings.  I used to believe
    that too, but I figured out that the implementation expense can be very
    small.  Here is why:   . . .

This topic has had enormous amounts of discussion a long time ago.
Perhaps you weren't party to the discussions back then, by my objection
-- shared by several others (e.g. Julian Padgett?)  --  is  *** not
at all *** on the performance implications.  In fact, in the earlier
discussion, I likened the algorithm for global-lexical access in
shallow bound implementations as a "dual" to that for dynamic access
in a deep bound implementation; efficient algorithms for this problem
have been known for nearly 15 years or more.

Now, QLISP is a deep bound implementation, and thus already has these
algorithms working (patterened, not unsurprisingly, after some of
the Interlisp work).  But we strongly feel that there should not be
two conceptually different "top level" environments -- a global-lexical
one and a global-dynamic one.  The counter argument that these would
be implemented as exactly the same set of value cells is not relevant.

Our feeling (if indeed I speak for some of the other objectors) is that 
local lexical overrides of global proclamations are acceptable;  the 
override has only tightly constrained lexical scope.  Thus a local
"lexical" declaration for a variable proclaimed to be SPECIAL is
not troublesome.  But an override of either a SPECIAL or a GLOBAL 
proclamation that has indefinite scope (yes "scope", not extent) is a 
terribly bad and confusing idea.   A special declaration or binding of 
a variable globally proclaimed LEXICAL (or, GLOBAL as in QLISP's case) 
would be such a violation.


-- JonL --