[Mono-list] Re: Is Objective-C support possible?

Martin Coxall coxall@cream.org
15 Feb 2002 20:34:15 +0000


>  > In any case the CLR is designed to avoid that by making its requirement of
>  > multiply inherited classes be abstract, so if you want broken OO via impure
>  > Mixins, I wouldn't expect the CLR to ever support that. ILX would still
>  > support the CLR notion of single inheritance, multiple interfaces.
> 
> You're talking about interfaces, not mixins.  The term came from the
> Flavors object system for Lisp, and mixins *do* come with
> implementations.  They're little classes that aretn't terribly useful
> by themselves, but when mixed in with a substantial class, add
> functionality.

Which from a modern OO perspective is a Very Bad Thing. Which is why
neither Java nor C# support them.

To achieve what you want without breaking encapsulation, use the
decorator pattern. Again if refer to Gang of Four.

Martin