[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
around method for make-instance
- To: info-mcl@cambridge.apple.com
- Subject: around method for make-instance
- From: djskrien@COLBY.EDU (Dale J. Skrien)
- Date: Thu, 18 Nov 93 17:09:33 -0500
Is there something special about putting methods
around the make-instance primary method?
For example, if I define:
(defclass foo () ())
(defmethod hello ((x foo))
'HI)
(defmethod hello :around ((x foo))
(let ((instance (call-next-method)))
(list instance)))
This around method works fine. I get:
? (hello (make-instance 'foo))
=> (HI)
But when I define:
(defmethod make-instance :around
((x foo) &rest initargs)
(let ((instance (call-next-method)))
(list instance)))
then I get:
? (make-instance 'foo)
=> #<FOO #x17E44F1>
Shouldn't I have gotten:
(#<FOO #x17E44F1>)
In other words, why didn't the around method
for make-instance cause the instance to be put
in a list? Thanks for any help.