On 05/29/2010 04:07 PM, Jan Moringen wrote:
> Hi Frank.
>> Another question:
>> (defclass foo ()
>> ((bar :initform (lambda () (make-vector 10 nil)))))
>> (make-instance 'foo)
>> ;; results in [object foo "foo" (lambda nil (make-vector 10 nil))]
>> Isn't the lambda expression of the :initform supposed to be evaluated at
>> instantiation time?
> I'm not entirely sure, but I think that behavior has been obsoleted.
It used to do that, but it is non-standard, and RMS wanted it removed.
It is supposed to instead be something like:
(defclass foo ()
((bar :initform (make-vector 10 nil)))
but I haven't looked up the specifics of how that all is supposed to
work, nor tried to make it do the right thing.