[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Another omission: global lexicals
- To: RAM@C.CS.CMU.EDU
- Subject: Another omission: global lexicals
- From: Daniel L. Weinreb <DLW@SCRC-QUABBIN.ARPA>
- Date: Mon, 16 Dec 85 10:11 EST
- Cc: JAR@MIT-MC.ARPA, common-lisp@SU-AI.ARPA
- In-reply-to: <RAM.12167474504.BABYL@C.CS.CMU.EDU>
I thought we were in agreement, but now I'm not sure. What does this
program print?
(defglobal g 4)
(set 'g 5)
(defun foo ()
(setq g 6))
(foo)
(print g)
In my interpretation of your original proposal, (print g) is referring
to g lexically, since nobody ever declared it special. foo is referring
to g lexically also. The value of the symbol named g is irrelevant; the
program prints 6.
Before I continue this message, is it your current claim that it prints
6, or that it prints 5?