closer-mop added subclassp as a regular function, as described in this
log:
Thu Nov 6 06:17:13 CST 2008 pc(a)p-cos.net
* Added utility function subclassp.
Some CLOS implementations have problems with determining subtype
relationships between classes in certain corner cases. For example,
clisp doesn't like to determine such relationships for forward
referenced classes, and some instances of PCL have problems with
anonymous classes under certain circumstances (primarily when doing
CLOS MOP programming).
Apparently, subtypep is typically implemented based on the class
precedence list, which can only be determined until after a class has
been finalized, and this seems to be one of the reasons for these
problems. However, the CLOS MOP places restrictions on methods for
compute-class-precedence-list such that the subtype relationship
actually does _not_ depend on the precedence list, but can be based on
a membership test in the unordered set of all direct and indirect
superclasses.
I have provided subclassp in Closer to MOP as a utility function that
does just that: It walks the superclass hierarchy to determine whether
one class is a subclass of another. This implementation is not that
efficient, so it should only be used when subtypep fails. (It could
probably be made more efficient, but since this is only provided as a
replacement for subtypep in hopefully rare corner cases, I haven't put
the energy into this to do this yet.)
The attached patch removes the Moptilities subclassp definitions, so it
just reexports closer-mop's version.
--
I write stuff at http://failex.blogspot.com/ now. But the post
formatter and themes are terrible for sharing code, the primary
content, so it might go away sooner or later.