[armedbear-devel] initialization of shared slots

Erik Huelsmann ehuels at gmail.com
Wed Jan 26 08:30:17 UTC 2011

Hi Didier,

> So, after some discussion on cll and pro@, I have some precisions about
> this. From what I understand of CLHS now, an implementation is not
> required to initialize a shared slot at class creation time from the
> initform (so far so good for ABCL).
> However, the iniform of a shared slot must be evaluated in the dynamic
> environment of the defclass call, even if it's not used to initialize
> the slot right now (see the defclass page). The following test shows
> that ABCL's behavior is currently incorrect in that regard:
> (defclass fungy ()
>  ((x :allocation :class
>      :initform (progn
>                  (format *debug-io* "~&x initform~%")
>                  6)
>      :initarg :x)
>   (y :initform (progn
>                  (format *debug-io* "~&y initform~%")
>                  7)
>      :initarg :y)))
> CL-USER(1): (defclass fungy () ...)
> CL-USER(2): (make-instance 'fungy)
> x initform                                <========= this is too late

Just committed the fix for this to ABCL trunk.



More information about the armedbear-devel mailing list