Subject: Re: How to implement setf ?
From: rpw3@rpw3.org (Rob Warnock)
Date: Sun, 14 May 2006 20:57:06 -0500
Newsgroups: comp.lang.lisp
Message-ID: <L9adnZh3MoJvQvrZnZ2dnUVZ_uWdnZ2d@speakeasy.net>
Pascal Bourguignon  <pjb@informatimago.com> wrote:
+---------------
| Since always, (from the beginning), lisp implementations were written
| in lisp (even if the first one was then hand-compiled to 704
| assembler).  If the inventor of lisp used lisp to write lisp, why
| couldn't you do the same?
| 
| ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-008.pdf
+---------------

A much more readable extended version (the 1960 CACM paper), which also
contains the "boxes & arrows" descriptions of internal data structures
and the low-level machine implementation of a few of the primitives
(both intentionally omitted from AIM-008), may be found here:

    http://www-formal.stanford.edu/jmc/recursive.html  [cover page]
    http://www-formal.stanford.edu/jmc/recursive.pdf

+---------------
| I'd advise you to read SICP too: 
|   http://mitpress.mit.edu/sicp/full-text/book/book.html
| or watch the videos:
|   http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/
+---------------

And any serious would-be implementor should also read Christian
Queinnec's marvelous "LiSP", which covers numerous design
alternatives in the implementation of Lisp-like languages:

    "Lisp in Small Pieces" [originally "Les langages Lisp"]
    http://www-spi.lip6.fr/~queinnec/WWW/LiSP.html
    http://www-spi.lip6.fr/~queinnec/common/LiSPeng.png

I personally found "Chapter 6: Fast interpretation" to be
particularly useful as an introduction to the preprocessing
needed for fast lexical variables, including various alternatives
for the runtime representations of lexical environments [including
one particularly-tricky "gotcha" in the interaction between the
representation of closures and Scheme-style continuations].


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607