[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MAKE-METHOD arguments discussion
- To: Moon@STONY-BROOK.SCRC.Symbolics.COM
- Subject: Re: MAKE-METHOD arguments discussion
- From: Gregor Kiczales <Gregor.pa@Xerox.COM>
- Date: 5 Jan 87 13:06 PST
- Cc: Common-Lisp-Object-System@SAIL.STANFORD.EDU
- In-reply-to: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>'s message of Sun, 28 Dec 86 19:16 EST
- Sender: Gregor.pa@Xerox.COM
Moon says:
I forgot to mention that I don't see how the capability of
WITH-SLOTS to determine the class of an instance-form by looking at
the defmethod lambda-list can be implemented without blessing the
function. Or is that a feature that only works inside defmethod
and isn't available to users making their own methods at the
make-method level?
The reason I don't want the function to be blessed is that given this
situation:
(defclass foo () (x))
(defmethod foo ((f foo)) (slot-value f 'x))
I want it to be legal to say one of:
(funcall (get-method (symbol-function 'foo) () (list (class-named
'foo)))
(make-instance 'foo))
or:
(funcall (method-function
(get-method (symbol-function 'foo) () (list (class-named
'foo))))
(make-instance 'foo))
I want it to have the same effect as saying:
(foo (make-instance 'foo))
Danny's idea for communicating class informat to with-slots, (including
information which would allow optimizations), was to have method-lambda,
so:
(funcall #'(method-lambda ((f foo)) (with (f) x))
(make-instance 'foo 'x 1))
would return 1, but
(funcall #'(method-lambda ((f foo)) (with (f) x))
nil)
is an error