<rocco.rossi@gmail.com> wrote:
+---------------
| I think I've found the answer to that last question (Hyperspec):
| "Common Lisp provides no operation on a symbol that can have any
| effect on a lexical variable or on a lexical function definition."
+---------------
That's because by the time the code runs lexical variabless don't
even *have* any "symbols" any more, at least not once the code is
compiled [or even just pre-processed for "fast interpretation"].
They're [usually] just converted to stack offsets in the resulting
code. E.g., try this in your favorite CL compiler:
(disassemble
(lambda (x)
(declare (type (integer -1000 1000) x)
(optimized (speed 3) (safety 0) (debug 0)))
(let ((y 5))
(+ y (* x 37)))))
See if you can find the "Y" anywhere... ;-}
-Rob
p.s. In CMUCL on x86, the only trace left of Y is this
single instruction:
ADD EDX, 20
[In CMUCL, fixnums are 30-bit signed ints shifted left two,
hence 5 => 20.]
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607