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

Issue: PROCLAIM-SPECIAL (Version 9)




[From Ballot]
    Under this proposal, special proclamations establish a default for
    a name but, because of the lexical declaration, no longer force it
    to be special everywhere.  It also allows the programmer to say
    that a global name is intended as a variable (i.e., references to
    it are not spelling mistakes) without proclaiming it special.  I
    think these are important changes that should be preserved even if
    this proposal fails.  Another important feature is that LG references
    to global variables can be fast in deep-bound implementations (since
    L "searches" can be compiled away) while DG references (the only
    global variables we have now) first have to look in D.  Finally,
    the current semantics are subtly confusing, because the specialness
    of global variables occasionally shows through.  For all of these
    reasons, I support this proposal.

    I think the most controversial change is the introduction of a
    separate global environment, where before the only globals were
    effectively just the global end of the dynamic env.  Most of the
    implementation complexity stems from this change, and it is likely
    that it lies behind most objections.
    
    A reasonable fallback, if this proposal does not pass, would be
    to say that variables that are proclaimed lexical can never by
    given dynamic bindings.  That is, the global value would be taken
    after searching L or D but not both and so would effectively be
    an extension of the L or D env, case by case.  This would be
    somewhat unfortunate, because local lexical bindings for names
    proclaimed special would still make sense (because they could be
    declared lexical) but we wouldn't allow local special declarations
    for names proclaimed lexical.  The full proposal is better.