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

Re: IS there a usual-XXX function ?

>    Date: Thu, 30 Aug 90 11:55:27 CDT
>    From: Richard Lynch <lynch@aristotle.ils.nwu.edu>
>    I'm at a point in a complex object hierarchy where I want to know if there
>    IS a real usual-cut function for any of the ancestors.  Will (fhavep 'usual-cut)
>    tell me anything? or do I have to go through the ancestor hierarchy manually
>    to find a (fhavep 'cut) or not ?
> There is no FHAVEP (to my knowledge).
> FBOUNDP will tell you if there is an accessible binding in the current
> object, or any of it's ancestors, down to the root (global) environment.
> FOWNP will tell you if the current object has its own binding for the
> function.  It doesn't search ancestors.

Neither of these things (nor any straightforward combination of them that I
can think of) will tell you what function, if any, will be invoked by a given
call to USUAL-xxx.

As far as I remember, Object Lisp's lack of anything analogous to CLOS' NEXT-
METHOD-P is intended to be a feature: a call to USUAL-xxx when "there is no
USUAL-xxx" is defined to be a no-op (as opposed to signalling a NO-NEXT-METHOD
error.)  The belief was that the programmer had no other reason to be concerned
about the existence of a "USUAL" function.

You (Richard Lynch) indicated that your code was complicated, but can you
explain a little more about why your program needs to know about, e.g.,

>    -andrew

Gary Byers