Implementing multiple inheritance in D
Jacob Carlborg
doob at me.com
Mon May 9 11:52:04 PDT 2011
On 2011-05-09 19:43, kenji hara wrote:
> I have tried to implement multiple inheritance in D.
>
> My first idea is binary inheritance tree with using alias this, but
> current dmd doesn't look alias this on superclasses.
> So I have tried to fix this behavior.
> -> https://github.com/9rnsr/dmd/tree/MultiInheritPatch
>
> Result:
> -> http://ideone.com/iD4JE
>
> Some issues:
> - Calling constructors of superclasses syntax.
> - Object layout (share __monitor object? reduce overhead?)
>
> Do you think?
Why not emulate it with interfaces and template mixins?
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list