[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
no-applicable-method
- To: Bobrow.pa@Xerox.COM
- Subject: no-applicable-method
- From: Gregor.pa@Xerox.COM
- Date: Fri, 2 Oct 87 10:52 PDT
- Cc: Common-Lisp-Object-System@Sail.stanford.edu
- In-reply-to: <870924-085516-15017@Xerox>
- Line-fold: no
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).
-------