Deokjae Lee <[email protected]> wrote:
Is there any particular reason to disallow multiple "alias this" ?
Yes - the fact that it's not yet implemented. (it's on the drawing board , just not quite there yet.)
I can implement "multiple" interfaces and extend "single" base class in Java like this: <code> class C extends BaseClass implements Interface1, Interface2, ... </code> But I can't do it using D. Code like the following does not be compiled. <code> class C : BaseClass, Interface1, Interface2, ... </code> Is there any particular reason?
Uhm... That's supposed to work.
What's the difference between Java's approach and single "alias this"?
Java's (and D's) interfaces is something quite different from alias this. Alias this is a simplistic (though powerful) kind of subtyping where the class or struct can embed a different type, and behave as if it is one, though without polymorphism. -- Simen
