[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Continuing comments on Draft 11
- To: Cyphers@JASPER.SCRC.Symbolics.COM
- Subject: Re: Continuing comments on Draft 11
- From: Gregor Kiczales <gregor@parc.xerox.com>
- Date: Fri, 2 Nov 1990 13:47:35 PST
- Cc: Cyphers@JASPER.SCRC.Symbolics.COM, jonl@lucid.COM, mop@arisia.Xerox.COM
- Fake-sender: gregor@parc.xerox.com
- In-reply-to: "Scott Cyphers's message of Fri, 2 Nov 1990 13:32:00 PST <19901102213234.6.CYPHERS@SEAR.SCRC.Symbolics.COM>"
Date: Fri, 2 Nov 1990 13:32:00 PST
From: Scott Cyphers <Cyphers@JASPER.SCRC.Symbolics.COM>
Date: Fri, 2 Nov 1990 16:11 EST
From: Gregor Kiczales <Gregor@parc.xerox.COM>
If the user wanted to define a new class of method that added a lexical
function binding FOO around the body they would define a method like:
(defmethod make-method-lambda ((gf standard-generic-function)
(method my-method-1)
lambda
environment)
(call-next-method gf
method
`(,(car lambda) ,(cadr lambda)
`(flet ((foo ..)) ,@(cddr lambda)))
environment))
This would work (if you fixed the bug) just as well if you didn't say
that make-method-lambda returned a function which took two arguments, so
I don't see why you should be saying it.
METHOD-FUNCTION, on a method, would return a function of two arguments
(a list of args and a list of next methods). This is important to have
for things like user-built steppers. The implementation-model would be
that impls would call METHOD-FUNCTION, but, as usual, they don't have to
call it if they know what they are going to get. That is, there are no
relevant meta-level incursions.
If a function FUNCALL-METHOD-LAMBDA took arguments of a
MAKE-METHOD-LAMBDA's first and second values, a list of next methods, a
boolean of whether or not next methods were allowed, and the arguments
to the function, I could write such a FUNCALL-METHOD-LAMBDA function.
Is that good enough for a stepper?
I am not sure I understand either of your comments, but I have a
question that may clarify them for me. Are you implicitly assuming that
any user methods on make-method lambda would call CALL-NEXT-METHOD as in
my example. That is, are you assuming that the ultimate value returned
by MAKE-METHOD-LAMBDA would have been produced by an implementation
method?
If so, that would mean that I couldn't write call-next-method or
next-method-p for myself.
btw, I fixed the bug