[Q] mixin pattern - how to use an alternate Behavior for Class

Nathanael Scharli n.schaerli at gmx.net
Wed Jan 30 08:34:46 UTC 2002


Hey Rob,

> We are on the same page now, I believe, you with my problem and me with a
> clearer understanding of the way this is structured.  Superb!  The reason
> my original attempt of:
>
> 1b)     meta _ Metaclass new.
>          meta
>                  superclass: newSuper class
>                  methodDictionary: MethodDictionary new
>                  format: MixinClass format.
>          newClass _ meta new.
>
> doesn't work is not due to the shape of the instance.  It really
> is shaped
> to be a MixinClass, due to the format of the metaclass.  The problem is
> that the metaclass inheritance doesn't include MixinClass, so none of the
> protocol is understood.  The only way I was able to make this work is to
> break the inheritance of the metaclasses.  Wow!  Unless we break the
> multiple inheritance rule, there doesn't seem to be a way to maintain the
> inheritance structure, at the metaclass level, and have my new class
> (MyProxyMixin) understand MixinClass protocol.  Would you agree?

Yes, I agree and I really enjoyed talking with you about these
"meta-things". It's amazing, but whenever I get back into the "ST-80
meta-world", it takes me some mind-work until I completely understand it
again. (And I have already thought about it many times). This fact gives me
the feeling that the class and meta-level organization of ST-80 is not as
easy as it should be. I hope I'll find the time to work on it at some
point...

Cheers,
Nathanael




More information about the Squeak-dev mailing list