[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Another omission: global lexicals
- To: "Daniel L. Weinreb" <DLW@SCRC-QUABBIN.ARPA>
- Subject: Another omission: global lexicals
- From: Rob MacLachlan <RAM@C.CS.CMU.EDU>
- Date: Sun, 15 Dec 1985 20:49:00 -0000
- Cc: common-lisp@SU-AI.ARPA
- In-reply-to: Msg of 15 Dec 1985 16:38-EST from Daniel L. Weinreb <DLW at SCRC-QUABBIN.ARPA>
Date: Sunday, 15 December 1985 16:38-EST
From: Daniel L. Weinreb <DLW at SCRC-QUABBIN.ARPA>
To: RAM, common-lisp at SU-AI.ARPA
Re: Another omission: global lexicals
(let ((a 4))
(defun foo (x) ...)
(defun bar (y) ...)
would be a way to get global lexicals, if it were Common Lisp. The
current manual is ambiguous, or at least vague, about whether this is
construct is part of valid portable Common Lisp or not.
This is clearly legal; any implementation which doesn't allow it is
broken. There is some confusion about the meaning "top level forms"
such as PROCLAIM within such a construct, but I don't see any other
The lexical scope of a global lexical is everything. If you insist on
thinking about it this way, a global lexical is a global special which
isn't special, i.e. bindings of that name are lexical instead of
special. You can also think of a global lexical as being syntactic
sugar for wrapping a let around all the code in the world.
The only issue that seems murky to me is the interaction between
global specials and global lexicals. What happens if you do a
DEFGLOBAL and then a special procalamation on the same name? Is a
global lexical BOUNDP? Can you MAKUNBOUND it?