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

no-applicable-method



    Date: 24 Sep 87 08:55 PDT
    From: Bobrow.pa

    (no-applicable-method generic-function first-argument &rest
    all-arguments)

This all looks fine except for what I think is a bug in the example.

      To use no-applicable-method to build forwarders, we need a class that
    is not a subclass of any class except T;  hence no methods specialized
    on this argument will be applicable to instances of this class.  Hence
    all calls using an instance of this class as first argument will cause a
    trap to no-applicable-method.   We write:  

    (defmethod no-applicable-method (g-f (first forwarder) &rest args)
       (send-elsewhere *place* gf first args)))

Actually, I think the following is better:

(defmethod no-applicable-method (g-f (first forwarder) &rest args)
  (send-elsewhere *place* gf args))

The point being that this makes it more clear that the &rest argument
really contains all the arguments (the first arg appears in two places).
-------