[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ensure-generic-function
- Subject: Re: ensure-generic-function
- From: Gregor.pa@Xerox.COM
- Date: 18 Feb 87 14:48 PST
- Cc: Gregor.pa@Xerox.COM, Common-Lisp-Object-System@SAIL.STANFORD.EDU
- In-reply-to: Patrick H Dussud <DUSSUD%Jenner%ti-csl.csnet@RELAY.CS.NET>'s message of Wed, 18 Feb 87 15:36:35 CSTTo: DUSSUD%Jenner%ti-csl.csnet@RELAY.CS.NET
If we don't want the type of the generic function to be changed, we
can
pass (CLASS-NAMED 'GENERIC-FUNCTION) to the keyword-arg
:GENERIC-FUNCTION-CLASS.
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
can
work around it by checking if the symbol is FBOUNDP before calling
it
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
often.
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.