Subject: Re: Renaming a function
From: (Rob Warnock)
Date: Tue, 11 Dec 2007 21:02:01 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
<> 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:

      (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...  ;-}


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			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607