Subject: Re: A question about lexical binding
From: rpw3@rpw3.org (Rob Warnock)
Date: Wed, 15 Oct 2008 08:11:43 -0500
Newsgroups: comp.lang.lisp
Message-ID: <L4mdnYLqgcOScWjVnZ2dnUVZ_vGdnZ2d@speakeasy.net>
Pascal J. Bourguignon <pjb@informatimago.com> wrote:
+---------------
| jurgen_defurne <jurgen.defurne@pandora.be> writes:
| > This is one of the things that I find less appealing in SICP.
| > Sometimes things are not really clear. Looking upon it from the
| > previous perspective, a lexical environment and its implementation
| > should have been introduced as an exercise to the meta-circular
| > evaluator, not something to be introduced with compilation. In the
| > latter case, the way a lexical environment is implemented should have
| > been separate from what a lexical environment really is.
| 
| You could also consult LiSP for implementation questions.
| "Lisp in Small Pieces". This book covers Lisp, Scheme and other
| related dialects, their interpretation, semantics and compilation. To
| sum it up in a few figures: 500 pages, 11 chapters, 11 interpreters
| and 2 compilers. <http://www-spi.lip6.fr/~queinnec/WWW/LiSP.html>
+---------------

I strongly second this recommendation, In particular,
Chapter 6 "Fast Interpretation" should be quite helpful,
especially Section 6.1.9 "Variations on Environments",
where Queinnec discusses different ways to represent
lexical environments.


-Rob

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