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

Martin Coxall coxall@cream.org
15 Feb 2002 21:46:06 +0000


>  > Which from a modern OO perspective is a Very Bad Thing. Which is why
>  > neither Java nor C# support them.
> 
> Bah.  You seem to have missed the point that the OP was asking about:
> whether the .NET CLR can support more than just languages that look
> like C#.  I would agree that mixin classes would be a bad idea in Java
> or C#.  But not all languages are like C#.  For dynamically-typed
> languages, mixins do *not* break encapsulation.

True enough. But what was originally asked was something like "Will the
CLR ever support mixins or generics?"

To which the answer, I reckon is:

Generics - Yes, through ILX. Along with closures, thunks, tail-calls
etc. (For those that haven't read it
http://research.microsoft.com/~dsyme/papers/babel01.pdf). I assume
implementing ILX in mono is a post 1.0 issue, though.

Mixins - Never. It's simply not in keeping with CLR design goals. 

However, since the same effect can be achieved using a decorator design
pattern, whilst avoiding the complications that multiple inheritance
brings, I see no reason why Objective C can't be compiled to IL.

That, and the fact that since Objective C and IL are both
Turing-complete, one must be reducible to the other. It's simply a
matter of efficiency.

Martin