-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi!
Am 08.01.2011 11:22, schrieb Faré:
Daniel Weinreb wrote:
- however, nothing tells us that the resulting value is used immediately
to initialize the slot (it could just be stored somewhere), and implementations seem to be free to do so right now, or later when the first instance is created.
Pascal Costanza pc@p-cos.net wrote:
- When a class is defined for the first time, the :initform for a shared slot needs to be evaluated immediately, and its result must be stored in some temporary memory location. (There is no notion of first-class dynamic environments in Common Lisp, so there is no other way of ensuring that the :initform can be evaluated in the correct dynamic environment.)
No. You may immediately capture the lexical environment in a closure `(lambda () ,initform).
But that does not keep the /dynamic/ environment, as required by the DEFCLASS specification. Am I missing something obvious?
Best wishes Svante