>> 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 <[email protected]> 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).

_______________________________________________
pro mailing list
[email protected]
http://common-lisp.net/cgi-bin/mailman/listinfo/pro

Reply via email to