From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!193.213.112.26!newsfeed1.ulv.nextra.no!nextra.com!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: Declarations in LET* Date: 11 Oct 2002 00:00:34 +0000 Organization: Naggum Software, Oslo, Norway Lines: 43 Message-ID: <3243283234727557@naggum.no> References: <87ofa2k2rb.fsf@bird.agharta.de> <3243274746571088@naggum.no> <87fzvd27aa.fsf@bird.agharta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: maud.ifi.uio.no 1034294434 19070 129.240.65.5 (11 Oct 2002 00:00:34 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 11 Oct 2002 00:00:34 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:43671 * Edi Weitz | Yes, I would have expected this to signal an error because *A* isn't | bound when FOO is called[1], i.e. *A* is only declared to be special in | the body of the second LET form but not in its init-form. A quick test | with CMUCL, AllegroCL, and CLISP shows that they seem to agree with me. Good answer. | What caused my initial confusion was that it wasn't clear to me that (and | why) the same thing doesn't happen in BAR-2 above. After having been | pointed to 3.3.4 in the CLHS and after reading about the scope of the | variables in a LET* form I _think_ that I now understand what's going on. | Or am I still wrong? I think the most important issue here is that there is only one `declare´ statement that might apply, and since bindings are made in sequence rather than in parallel, that should apply to the declarations, too. | Maybe I should add that I loaded the three DEFUNs above into a fresh | image, i.e. there was no DEFPARAMETER or DEFVAR before which made *A* | globally special. Now that I think of it I'm not so sure anymore whether | the convention of enclosing variable names with asterisks applies to all | special variables or only to those which are _globally_ special. Well, I hunt for the `defvar´ or `defparameter´ when there are *'s around a variable name and think they should not be used when the variables so used are "internal". | [1]: I take it that you meant *A* and not A and that the asterisks got | lost somehow, either in my Emacs or yours due to Gnus' somewhat | peculiar behaviour. Amusingly, you are quite correct about the *boldface* thing in Gnus. Maybe we should convince the world to use a rich language to communicate font details and such, but these days that would be something ending in ML and it is probably better to uninvent that whole thing and get rid of the desire to use boldface. There is a reason why I use /italics/. -- 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.