Re: Iteration in lisp
- From: "John Thingstad" <jpthing@xxxxxxxxx>
- Date: Wed, 30 Apr 2008 12:47:23 +0200
(1) The extreme camp that says "oops, you misspelled something. I've
helpfully autodeclared it pervasively special." I think this is
really definitely not good.
right! A real pain.
(2) The moderate but still unwanted-by-me situation of taking
TOPLEVEL-LISP-PROMPT> (setq x 3)
or a programmatic call to (eval '(setq x 3))
as an opportunity to lecture the person about how x is undeclared and
maybe you don't really mean for it to be special. As I said, I can tolerate
it being silently taken as lexical in an implementation that wants to offer
such support, even by default. But what I don't want to be told is "I'm not
going to do something cool and innovative, nor am I even going to do the
obvious only thing that's left to do in the absence of something cool and
innovative--I'm just going to tell you that Lisp is hard to use and that you
should have an unpleasant interactive experience."
I actually don't know which implementations do this. I just know people
complain that some do and seem not to like writing SETQ at toplevel.
Usually I would want defparameter at the toplevel REPL.
I use the history to retrieve it to re-test.
defvar is only for things you want to survive through the session.
As such it is almost as dangerous as declaring something defconstant.
(on my list list of regrettable decisions)
--------------
John Thingstad
.
- References:
- Iteration in lisp
- From: rigaha@xxxxxxxxx
- Re: Iteration in lisp
- From: Kent M Pitman
- Re: Iteration in lisp
- From: John Thingstad
- Re: Iteration in lisp
- From: Kent M Pitman
- Re: Iteration in lisp
- From: Robert Maas, http://tinyurl.com/uh3t
- Re: Iteration in lisp
- From: Kent M Pitman
- Re: Iteration in lisp
- From: Scott Burson
- Re: Iteration in lisp
- From: Duane Rettig
- Re: Iteration in lisp
- From: Kent M Pitman
- Iteration in lisp
- Prev by Date: Re: How to make a copy of a list
- Next by Date: Re: Greenspunning ML (revisited)
- Previous by thread: Re: Iteration in lisp
- Next by thread: Re: Iteration in lisp
- Index(es):
Relevant Pages
|