[hunchentoot-devel] standalone server lw 5.0
Pierre THIERRY
nowhere.man at levallois.eu.org
Wed Mar 7 23:35:37 UTC 2007
Scribit Jonathon McKitrick dies 07/03/2007 hora 18:15:
> I'd like to understand from a lisp standpoint why this works the way
> it does. What is it about the function operator #' that it only grabs
> the value of the symbol when first evaluated? Is there a 'hidden'
> closure operation?
No need for this. Each symbol has an associated reference to a function.
The symbol-function operator just returns this reference. After calling
it, changing the symbol's function to another one only makes that the
function you just got a reference to is not referenced anymore by this
symbol.
If you want a function that would change when the symbol is redefined,
use the following instead of symbol-function:
(defun tracking-symbol-function (symbol)
(lambda (&rest args) (apply
(symbol-function symbol) args)))
Obviously there's an overhead when calling this one.
Quickly,
Pierre
--
nowhere.man at levallois.eu.org
OpenPGP 0xD9D50D8A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://mailman.common-lisp.net/pipermail/tbnl-devel/attachments/20070308/e65dc973/attachment.sig>
More information about the Tbnl-devel
mailing list