|[7 earlier articles]|
|Re: Example interpreter C email@example.com (Julian Stecklina) (2005-08-31)|
|Re: Example interpreter C firstname.lastname@example.org (Joerg Simon) (2005-09-02)|
|Re: Example interpreter C email@example.com (Laurence Finston) (2005-09-07)|
|Re: Example interpreter C firstname.lastname@example.org (Ivan Boldyrev) (2005-09-10)|
|Re: Example interpreter C email@example.com (George Neuner) (2005-09-10)|
|Re: Example interpreter C firstname.lastname@example.org (Laurence Finston) (2005-09-14)|
|Re: Example interpreter C email@example.com (Ivan Boldyrev) (2005-09-17)|
|Re: Lisp variables, was Example interpreter C firstname.lastname@example.org (Laurence Finston) (2005-09-22)|
|Re: Lisp variables, was Example interpreter C email@example.com (Julian Stecklina) (2005-09-25)|
|From:||Ivan Boldyrev <firstname.lastname@example.org>|
|Date:||17 Sep 2005 13:49:10 -0400|
|Organization:||this field is intentionally left blank|
|References:||05-08-055 05-08-062 05-08-073 05-08-084 05-09-025 05-09-036 05-09-051|
|X-Mantra:||OM MANI PADME HUM|
On 9233 day of my life Laurence Finston wrote:
>> Do you mean Python-like behavior? Modern Lisp dialects (Common Lisp
>> and Scheme) do require variables declarations.
> I haven't programmed in Common Lisp in several years, but this
> is the behavior I was referring to:
> GCL (GNU Common Lisp) Version(2.2.1) Thu Jul 17 11:34:27 MET DST 1997
GCL is bad example: it is not standard-conforming :)
> >(setq a "a")
According to ANSI Common Lisp standard (that was published in 1994),
SETQ'ing undeclared variable is undefined behavior. Some
implementations automatically declare this variable, some show an
error message. Some remove files from your home directory :)
Scheme definetely requires variable declaration.
Welcome to MzScheme version 208, Copyright (c) 2004 PLT Scheme, Inc.
> (set! a 1)
set!: cannot set undefined identifier: a
> I often write throwaway programs in Emacs-Lisp, which shows
> this behavior.
Yes, you can set undeclared variable in Elisp. But Elisp is just a
scripting language for editor, not the real thing. :)
P.S. I think it is far from topic of the list; if you wish to
continue the discussion, mail me privately or let's go to
Return to the
Search the comp.compilers archives again.