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


JAK writes:

``I guess one could make an analogy with function calling. The programmer
can either test if the function is bound before calling:

  (if (fboundp 'foo)
    (apply foo arglist))''

One could, but I think it's a bad analogy. Many methods can be written on
a generic function, and it is sensible to suppose that the authors of the
methods on that generic function might desire that his methods each call
the next most specific one - method combination could be used, but assume
not.  In this case, the writer of each method will not know, a priori,
whether there will be any other such methods.

Therefore, the author of such a method will be thinking that his method
will call the next most specific one, if it exists. In short, the test of
whether there is such a further method is like the termination test
in a control structure. Hence it is not like an exception.

The author of the code JAK mentions is calling a specific function
by name, and not be relative ``position'' from the current one. Thus,
I regard his analogy as not convincing.

I can support NEXT-METHOD-P, because I doubt there is much constructive
use to which the next method could be put - funcall its method-function (?).