[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: method-lambda and apply-method-lambda

Dave's analysis has clarified things somewhat. Here's some additional

>    MAKE-METHOD-FUNCTION proto-method generic-function qualifiers specializers
>                         lambda-exp &OPTIONAL macroexpand-environment

Yes, I agree that this is needed to handle CALL-NEXT-METHOD and other
metaclass dependent additions to the method function's lexical environment
(things like permutation tables are implementation specific details, and
therefore not part of the specification). I would have preferred to see
a more general function for constructing a function given a lexical
environment and a lambda expression, but, given the ambiguity in 
Common Lisp about such topics, this will have to do.

>    APPLY-METHOD method next-method-info &REST arguments

I don't think this generic function is really necessary, 
since APPLY, being itself
implementation dependent, could be modified to do the right thing given
a method function. Some implementations of APPLY 
already must differentiate based on whether the function object is a closure
or not, since in the former case, the lexical environment must be
modified to reflect the lexical environment of the closure, so the
additional case of a method function is probably nothing new.
However, it might be useful for metaobject programmers who want a hook
for a metaclass specific way of applying a method. In that case, I think
the NEXT-METHOD-INFO argument could be dropped, since the concept of
a next method is specific to STANDARD-METHOD. The method metaclass method
for this generic function would then implement any special processing
for changing control flow.