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

Re: Method Combination Proposal

The most significant comment I have about this is that in both of your
proposals, you mention functions like MAKE-METHOD-CALL which can only be
called from the body of a define-method-combination.  (Moon says this
explicitly, Danny just implies it).

This may be overly restrictive.  I think that all of these functions
should take an extra argument (tentatively named the
method-combination-identifier) which would allow them to be called by
sub-functions of the particular method combination.  The exisitence of
this "method combination identifier" interacts with the arguments to the
method combination since this identifier would have to be passed in
somehow, and the first argument to the method combination is a natural

In addition, I think the body of the method combination should have
access to the generic function in question.  It can't get it from the
methods since methods can be on more than one generic function. 

So I could write

(define-method-combination mine (generic-function id)
  ((all (*)))
  (grovel-my-method-combination generic-function id methods))

(defun grovel-my-method-combination (generic-function id methods)
  (make-method-call id methods :operator 'foo)

Note that even if we decide to restrict make-method-call to within the
body of define-method-combination I think the body should have access to
the generic function.

PROCLAIM-IDENTITY-WITH-ONE-ARGUMENT.   I don't see that this is an
appropriate mechanism for dealing  with this optimization.  It may just
be the name which is upsetting me, I am not sure yet.

:qualifier-set vs. * in pattern-language etc.

Moon's most recent message shows how defmethod can check the legality of
the qualifiers just by calling the method-combination and seeing if it
warns or errors.  This is probably good enough, but it should be noted
that it lacks the kind of precision of error message which Danny's
:qualifier-set proposal had.  On the other hand, the kind of tool which
could make use of that precision of error message definitely comes under
the environment category.

So I guess just using the template language will be good enough.

I also think the analogy between define-method-combination and defmacro
is useful, it would probably be worth including this analogy in the