[CM] local variables not shadowing in defprocess

Rick Taube taube@uiuc.edu
Thu, 15 Jul 2004 09:00:35 -0500


> I beleive theres some bug somewhere in latest (CVS cm-2.5.0).
> Local variables set inside #'defprocess are not looked up if
> theres a global variable with the same name.

If I understand you correctly this is not a bug its just a nasty 
consequence of working with closures and "special" variables in common 
lisp:

? (defparameter param 1)
PARAM
? (defparameter fn (let ((param -99)) #'(lambda () param)))
FN
;; so now a funcall of fn  should be -99, right?? wrong...
? (funcall fn)
1

Now try scheme, which does not believe in special variables(nor needs a 
"funcall" kludge:

guile> (define param 1)
guile> (define fn (let ((param -99)) (lambda () param)))
guile> (fn)
-99


personally i would throw away common lisp but for the fact that, for 
whatever reason, scheme still has no reasonable answer for someone that 
wants a good introspective object system AND fast code. but maybe 
someone can enlighten me.