[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

:class vs :initform



The next version of pcl finally fixes the bug which prevented the
initform for :class allocation slots from being evaluated when the class
was defined.  Here is a test case:

(defclass foo ()
    ((a :initform (+ 1 2)
        :allocation :class)))
#<Standard-Class FOO>

;; This returns 3 rather than the (+ 1 2) it used to return.
(slot-value (make-instance 'foo) 'a)
3


I am sending this out as a separate message to warn everyone that this
change is coming.  This version of PCL will be released sometime in the
next couple of days.
-------