[Mono-list] Re: Is Objective-C support possible?
Mon, 18 Feb 2002 14:45:07 -0000
No we're very much not agreed.
Tell me... bar carrying implementation detail what the difference is in inhereitence model between an interface and a mix-in?
Mixins are implimented in many languages as a class, this does not mean they have to be implimented in such a fashion... in CLR they can be implemented in a class-like structure, such as the interface.... think of an abstract class upon which multiple inheritence is allowed.
A mix-in does not need to behave any differently than an interface it's is a parralell construct. A mix-in simply brings along something extra that an interface doesn't on it's own.... method implimentation.... that's it, it's not complex, it's not difficult, it doesn't throw anything out of whack. For safety one can even constrain it so that a mix-in *must* inherit (implement) and interface, and canot impliment beyond an interface... more than I think is necessary, but enough surely to appease the paranoid.
There are no reasons why mix-ins could not be introduced to CLR.
And I will NOT go along with your assumption that multiple inheritence is a bad thing, to assert such out of hand borders on the childish.
I'm sorry, but unless you can assure me you're other than a student pumped up on your OO lectures I'm simply not willing to continue the conversation as my blood preassure is starting to rise, and I'm starting to think you might be simply baiting me for giggles.
I disagree. Mixins would have to subclass System.Object, otherwise an
object of type "mixin" wouldn't be an Object, and wouldn't be able to be
stored in Collections, etc. You'd end up with the mess Java currently
has, where not everything is an Object. This is to be avoided.
Are we agreed, however, that as long as we *assume* (a) multiple
inheritance is bad and (b) every class should be of type Object, then it
follows that mixins are also bad?
Mono-list maillist - Monoemail@example.com