Subject: Re: EVAL Implementations From: Erik Naggum <erik@naggum.no> Date: 1996/08/30 Newsgroups: comp.lang.lisp Message-ID: <3050412036443613@arcana.naggum.no> [Jeff Dalton] | Could you perhaps say, for me and any others in similar boats, what | technical issue is, as you see it. the initial technical point I made was that Common Lisp does not make the distinction that Robert Munyer said it does in his reply, namely of _treating_ foo special in (defvar foo ...) and _not_ special in (setq foo ...) at top-level. his exact words from <4v7ifq$976@Mars.mcs.com> were as follows: DEFVAR doesn't just define a global variable X; it also declares that all variables X are "special." A special variable is dynamic rather than lexical, so it bypasses the normal scoping rule. Look what would happen if you used SETQ rather than DEFVAR, to establish a global variable without declaring it to be special: ? (setq x 100) 100 ? (let ((x 1)) (eval 'x)) ;Compiler warnings : ; Unused lexical variable X, in an anonymous lambda form. 100 I pointed out that the semantics of SETQ at top-level without a special declaration is not defined by the language. and the fact remains, it is not defined by the language. implementations are free to do what they want. | Well, I'll read the manual, if you say what sections you think are | relevant. in my reply to him in <3049395203874246@arcana.naggum.no>, I wrote: for more information on the environments in Common Lisp, see the Common Lisp Hyperspec at Harlequin, Inc, section 3.1.1 Introduction to Environments. http://www.harlequin.com/books/HyperSpec/Body/sec_3-1-1.html after which Robert argued that the HyperSpec was in conflict with CLtL2, that he could change a few words to amend his article, and strongly implied that his purpose was to have _me_ (not the standard, not the language) distinguish between the behavior of SETQ and DEFVAR at top-level, which I had already stated very clearly was not defined by the standard. res ipsa loquitur. #\Erik -- main () { printf ("%d\n", sin ("foo")); }