Re: confirmation on :default-initargs not working?
JP Massar <[email protected]>
| Newsgroups | gmane.lisp.corman |
|---|---|
| Message-ID | <[email protected]> |
At 10:40 AM 3/18/03 -0500, Kenny Tilton wrote:
>(defclass aaa ()
> > ((xxx :initform 'x :initarg :xxx :accessor xxx)
> > (yyy :initform 'y :initarg :yy :accessor yyy))
> > (:default-initargs
> > :xxx 'xx
> > :yy 'yy))
I can confirm the behavior.
(defclass aaa ()
((xxx :initform 'x :initarg :xxx :accessor xxx)
(yyy :initform 'y :initarg :yy :accessor yyy))
(:default-initargs
:xxx 'xx
:yy 'yy))
#<Standard-Class AAA #x11E4EA0>
(describe (make-instance 'aaa))
printed representation: #<Aaa #x14AE2F0>
class: #<Standard-Class AAA #x14AE558>
heap address: #x14AE2F0
xxx: X
yyy: Y
(defclass bbb ()
((xxx :initarg :xxx :accessor xxx)
(yyy :initarg :yy :accessor yyy))
(:default-initargs
:xxx 'xx
:yy 'yy))
#<Standard-Class BBB #x14C4540>
(describe (make-instance 'bbb))
CLOS OBJECT:
printed representation: #<Bbb #x11B8E00>
class: #<Standard-Class BBB #x14C4540>
heap address: #x11B8E00
xxx: not bound
yyy: not bound