[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: issue PROCLAIM-LEXICAL
- To: Jeff Dalton <jeff%aiai.edinburgh.ac.uk@NSS.Cs.Ucl.AC.UK>
- Subject: Re: issue PROCLAIM-LEXICAL
- From: email@example.com (Sandra J Loosemore)
- Date: Fri, 14 Oct 88 13:38:27 MDT
- Cc: firstname.lastname@example.org
- In-reply-to: Jeff Dalton <jeff%aiai.edinburgh.ac.uk@NSS.Cs.Ucl.AC.UK>, Fri, 14 Oct 88 19:11:41 BST
> Date: Fri, 14 Oct 88 19:11:41 BST
> From: Jeff Dalton <jeff%aiai.edinburgh.ac.uk@NSS.Cs.Ucl.AC.UK>
> There are some problems with the DEFCONSTANT model for "global lexical".
> The constants are effectively proclaimed SPECIAL but (special) binding
> is disallowed. Because of the SPECIAL proclamation, this prevents
> lexical binding too; but lexical binding should not be prevented for
> global lexicals.
That isn't what CLtL says about DEFCONSTANT. From p. 69:
Once a name has been declared by defconstant to be constant, any
further assignment to or binding of that special variable is an error.
[...] A compiler may also choose to issue warnings about bindings of
the lexical variable of the same name.
My impression is that this wording was carefully chosen with the
specific intent of allowing (but maybe not encouraging) lexical
binding of the name. Note that it specifically outlaws special
binding but says something else entirely about lexical binding. Also,
I don't believe this means constants are effectively proclaimed
SPECIAL, because (as the language is defined in CLtL) the question of
lexical bindings would never come up at all then.
> That said, however, I don't think I disagree with you very much.