Subject: Re: Declarations in LET*
From: Erik Naggum <>
Date: 10 Oct 2002 21:39:06 +0000
Newsgroups: comp.lang.lisp
Message-ID: <>

* Edi Weitz
| From playing around with CMUCL, SBCL, LispWorks, AllegroCL, and CLISP it
| looks to me as if BAR-1 and BAR-2 in the following example
|   (defun foo ()
|     (declare (special *a*))
|     *a*)
|   (defun bar-1 ()
|     (let ((*a* 37))
|       (declare (special *a*))
|       (let ((b (foo)))
|         b)))
|   (defun bar-2 ()
|     (let* ((*a* 37)
|            (b (foo)))
|       (declare (special *a*))
|         b))
| behaved identically, i.e. as if in the LET* form *A* is already
| special when B is bound.

  It appears that you have received an answer to your question, but in case
  there is still some confusion, do or did you think that

(let ((a 42))
  (let ((b (foo)))
    (declare (special a))

  should yield a different result?  If yes, why?

Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.