Re: The Lisp CPU

From: Frank Buss (fb_at_frank-buss.de)
Date: 08/11/04


Date: Wed, 11 Aug 2004 18:41:15 +0000 (UTC)

mikel <mikel@evins.net> wrote:

> Not sure I understand; alists will be pretty fast for the typical
> case.

not so fast as direct access to a fixed memory position, because you have
to traverse the list, which is too slow. I didn't mention that I want to
built a real-time Lisp CPU with guaranteed response time.

> Dynamic binding makes possible situations like:
>
> (defun foo ()
> ...
> (setf my-var 1)
> ...)
>
> (defun bar ()
> (let ((my-var "hello"))
> ...
> (foo)
> (do-string-thing my-var)
> ))

you are right, this is another possible source of errors. Depending on
the programming style it is not too contrived, but if you keep in mind
that setf modifies a dynamic variable, while "let" introduces a new local
variable, I think you could avoid it. It could be done, Emacs Lisp proves
it :-)

-- 
Frank Buß, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de