[Openmcl-devel] Is this a bug?
Ron Garret
ron at awun.net
Fri Feb 8 23:00:47 PST 2008
? (defclass foo () ((x :initarg :x :initform 1)) (:default-initargs :x
2))
#<STANDARD-CLASS FOO>
? (slot-value (make-instance 'foo) 'x)
2
? (defclass foo () ((x :initarg :x :initform 1)))
#<STANDARD-CLASS FOO>
? (slot-value (make-instance 'foo) 'x)
2
?
SBCL does the same thing, so I'm not sure. CLisp works the way I'd
expect (returning 1 in the second case).
(What's the rationale behind having both :initform and :default-
initargs?)
rg
More information about the Openmcl-devel
mailing list