From gwking at metabang.com Fri Nov 7 16:14:46 2008 From: gwking at metabang.com (Gary King) Date: Fri, 7 Nov 2008 11:14:46 -0500 Subject: [Moptilities-devel] [PATCH] remove subclassp definition, as it is now part of closer-mop In-Reply-To: References: Message-ID: <561F35D4-D9FA-4832-8CFD-A9A03F2C8D93@metabang.com> Hi Stephen, Thanks for this patch. I just pushed it out. On Nov 6, 2008, at 10:15 PM, Stephen Compall wrote: > 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. > > > -- > 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. -- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM From s11 at member.fsf.org Fri Nov 7 03:15:32 2008 From: s11 at member.fsf.org (Stephen Compall) Date: Thu, 06 Nov 2008 21:15:32 -0600 Subject: [Moptilities-devel] [PATCH] remove subclassp definition, as it is now part of closer-mop Message-ID: 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: -------------- 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.