[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Various Topics Discussed Last Week
- To: Moon@STONY-BROOK.SCRC.Symbolics.COM
- Subject: Re: Various Topics Discussed Last Week
- From: Danny Bobrow <Bobrow.pa@Xerox.COM>
- Date: 28 Sep 87 16:51 PDT
- Cc: common-lisp-object-system@SAIL.STANFORD.EDU
- In-reply-to: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>'s message of Mon, 28 Sep 87 13:07 EDT
- Sender: Bobrow.pa@Xerox.COM
JAK: Someone could write a forwarding metaobject method as:
(defmethod no-applicable-method
((gf forwarding-generic-function)
&rest all-arguments)
(apply #'forward-method all-arguments))
A user can do something similar with the default method,
with somewhat hairier code.
Moon:The problem with this is that people want forwarding for "all"
generic functions, not just specially identified ones. I put "all"
in quotation marks because after they have thought about it deeply
they usually discover that there are some generic functions that
mustn't forward.
However, I like your suggestion anyway. If we make the
arguments to no-applicable-method be generic-function &rest
all-arguments, someone who wants to do delegation can redefine the
default method to call a new generic function with whatever
arguments they want. Not having that built into CLOS doesn't make
it impossible to add on one's own.
Much as I dislike having to give up this feature, I have to admit that
what is being given up is one generic function call after redefining the
default method. Given the groans I heard when I apecialized on the
first argument, I will write this up as suggested, with only two
arguments to no-applicable-method, generic-function and
function-arguments.
danny