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

Re: no-applicable-method



Some small items on NO-APPLICALBLE-METHOD:

1.  The example that cheeweei has trouble with works fine in my
system.  At least, the example below works.

2.  The problem that i have with NO-APPLICABLE-METHOD is that i'd
really like to specialize it on more than the first argument.  For
example, say i define a class that uses NO-APPLICABLE-METHOD to do a
kind of simple delegation:

(defmethod no-applicable-method ((gf standard-generic-function) &rest args)
    ;; Try delegation.
    (let ((method (apply #'find-delegated-method gf args)))
      (if method (apply method args)
	(call-next-method))))

I don't need to change the behavior of STANDARD-GF, i just want to
do something different if one or more of the arguments can delegate.
Unfortuantely, i can't specialize on any of the args so i must do it
with FIND-DELEGATED-METHOD.

3.  If i'm forced by Gregor not to change STANDARD-GENERIC-FUNCTION, i
must define my own and make every gf use it.  This is a lot more work
than simply adding one new method.

k