[Moptilities-devel] [PATCH] remove subclassp definition, as it is now part of closer-mop

Stephen Compall s11 at member.fsf.org
Fri Nov 7 03:15:32 UTC 2008


closer-mop added subclassp as a regular function, as described in this
log:

Thu Nov  6 06:17:13 CST 2008  pc at 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: moptilities.remove-subclassp-gf.dpatch
Type: application/octet-stream
Size: 9005 bytes
Desc: a Darcs patch
URL: <https://mailman.common-lisp.net/pipermail/moptilities-devel/attachments/20081106/715d9b62/attachment.obj>
-------------- next part --------------

-- 
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.


More information about the Moptilities-devel mailing list