[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EVAL-WHEN
Date: 4 Apr 1986 09:35-EST
From: NGALL@G.BBN.COM
Date: Thu 3 Apr 86 22:52:12-EST
From: "Rodney A. Brooks" <BROOKS%OZ.AI.MIT.EDU@XX.LCS.MIT.EDU>
Doesn't
(setf (symbol-function 'foo) (COPY '(LAMBDA ...)))
guarantee to produce a function definition not compiled by compiling the
file. If (setf (symbol-function 'foo) ...) compiles, then all bets are
off.
There is no requirement in CLtL that it be legal for a symbol function
cell to contain a lambda expression. In some implementations this
will cause an error when such a symbol is used in the function
position of an eval-ed expression. These implementations place a closure
in symbol function cells for interpreted functions, which all point
to the same compiled code sequence which takes a literal from the
closure (the literal is the lambda expression) and does the right
call into the middle of the interpreter.
This should definitely be pointed out on page 90. Also, exactly what objects
may be the value in a setf of (symbol-function <<symbol>>) should be clarified.
I would contend that any Lisp object may be the value in a setf of
(symbol-function <symbol>), and that a subsequent invocation of
(symbol-function <symbol>) should retrieve exactly that object (or one
EQL to it). However, this does not prevent implementations from
wrapping that object in a closure internally on storing and unwrapping
it again on fetching.
--Guy