[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Method Combination
- To: Moon@STONY-BROOK.SCRC.Symbolics.COM
- Subject: Re: Method Combination
- From: Danny Bobrow <Bobrow.pa@Xerox.COM>
- Date: 30 Jan 87 15:30 PST
- Cc: Common-Lisp-Object-system@SAIL.STANFORD.EDU
- Sender: Bobrow.pa@Xerox.COM
Dave and I had a telephone conversation today to discuss the outstanding
issues of define-method-combination (mostly because there were things I
didn't understand). My understanding of the agreement we came to
follows. Dave please comment if you think I have misrepresented any
part.
1) Syntax of define-method-combination:
(d-m-c name lambda-list method-group-specifiers doc/decl* form*)
as is specified in current document.
However, lambda-list is an internal lambda list used ONLY for parsing of
extra parameters supplied to compute-effective-method. It does not
include a name for the generic-function. The well-known-name
"generic-function" is available for use within the
define-method-combination forms.
The argument list of compute-effective-method is
(generic-function combination-name applicable-methods &optional params)
define-method-combination implicitly defines a specialized method for
compute-effective-method, using lambda-list as an internal lambda-list
to destructure, bind and error check the params argument for
compute-effective-method.
(d-m-c name lam-list ((v1 v1-pat)(v2 v2-pat ..)...) . body)
expands to approximately
(defmethod
((generic-function standard-generic-function)
(c-type (quote name))
applicable-methods
&optional params)
(declare (special generic-function)) ;; is this declaration right
((lambda lam-list
(let ((methods-left applicable-methods)
v1 v2 ...)
(multiple-value-setq v1 methods-left
(select-methods methods-left 'v1-pat ...))
(multiple-value-setq v2 methods-left
(select-methods methods-left 'v2-pat ...))
...
(AND methods-left (method-combination-error...))
. body)
params))
2) Support of around methods
We agreed that the make-method-call form made it easy enough to
support :around methods, so no further syntax was needed. We agreed
that we would use
:operator :call-next-method
in make-method-call as the way to indicate call-next-method combination.
We will eliminate the :around keyword from make-method-call.
3) We disagreed whether the standard should have only one form of
define-method-combination (danny thought Yes, dave No), but Dave agreed
to put the short form second in the document, and to describe it mostly
in terms of its expansion to the long form. Dave said he would think
about renaming the short form, for example to define-simple-combination.
4) I agreed that Moon's rule for CPL, although not as easy to understand
as I might like, captured the criteria I wanted to preserve for the
class precedence list. I am happy to stop worrying about this problem.