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

Re: Various Topics Discussed Last Week



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