[Openmcl-devel] mop issue

rm at fabula.de rm at fabula.de
Sat Oct 2 12:02:32 PDT 2004

On Sat, Oct 02, 2004 at 08:48:25PM +0200, marco wrote:
> Cyrus Harmon <ch-openmcl at bobobeach.com> writes:
> > I did something similar sticking the superclass onto the 
> > :direct-superclasses in an around method in initialize-instance and 
> > reinitialize-instance. I used the clsql MOP stuff as a guiding example 
> > and that seemed to work pretty well.
> this should have super as a direct super class:
> (defclass foo ()
>   ()
>   (:metaclass klass))

Yes, but technically speaking it doesn't (and i think here's the
root of yourproblems). Inspectng foo shows super on the class
precedence list but _not_ on the list of direct superclasses.
Your asumption seems to be that the lsit of direct superclasses
is only needed to compute the cpl but that might very well prove
wrong (sorry, haven't looked to close at OpenMCL mop). 

> but this:
> (defclass bar (foo)
>   ()
>   (:metaclass klass))
> should _not_ since super is already a super class of foo which is a
> super class of bar. adding super to bar's direct-superclasses would
> probably work most of the time, but really isn't what i want.

Why? If you append it to the list of direct-supers? Anyway, the way 
clsql does it: look if super is already on the cpl of any of the 
direct supers and append it to the list iff not.


> -- 
> -Marco
> Ring the bells that still can ring.
> Forget your perfect offering.
> There is a crack in everything.
> That's how the light gets in.
>      -Leonard Cohen
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel

More information about the Openmcl-devel mailing list