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

Re: ensure-generic-function

    If we don't want the type of the generic function to be changed, we
    pass (CLASS-NAMED 'GENERIC-FUNCTION) to the keyword-arg

I am not sure I understand what this means.

     If this function is meant to be used to normalize the argument to 
     GET-METHOD then it's not okay to create the generic function. We
     work around it by checking if the symbol is FBOUNDP before calling
     but a situation like this seems to be frequent enough so
     ensure-generic-function should handle it.

It seems to me that this error case is better dealt with outside of
ensure-generic-function.  I guess that means I don't see this function
being used to normalize the first argument to get-method very often.  I
expect it to be used to normalize the first argument to add-method more

Basically, there are so many different ways I can imagine wanting to be
careful about what to do with the value that is already in the function
cell, that I think the best thing to do is make this function have a
simple behavior and let people put checking code around calls to it when
that is appropriate.