[Openmcl-devel] Compiler warnings
Ron Garret
ron at flownet.com
Sun Oct 18 04:21:53 PDT 2009
On Oct 18, 2009, at 4:14 AM, Taoufik Dachraoui wrote:
> Also, I would like to insist on the fact that SETF creates a lexical
> variable (on behavior at least,
> it is weird for me to say that because for me when I learned Common
> Lisp I was told that
> there a daynamic and lexical variables).
Insist all you want, that won't make you right.
> The following example shows that SETF creates a lexical variable
> (because f always returns
> the value of x as defined by SETF)
No, it doesn't:
? (setf x 1)
1
? (defun f () (+ x 1))
;Compiler warnings :
; In F: Undeclared free variable X
F
? (let ((x pi)) (declare (special x)) (f))
4.141592653589793D0
? x
1
?
>
> If you do not agree please explain in more details so I learn and
> understand something new.
>
See:
http://www.flownet.com/ron/specials.pdf
rg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20091018/42e2b843/attachment.htm>
More information about the Openmcl-devel
mailing list