Converting multiple inheritance code into C ++ for D language

Jean Cesar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Feb 17 15:35:33 PST 2017


On Friday, 17 February 2017 at 23:31:41 UTC, Adam D. Ruppe wrote:
> On Friday, 17 February 2017 at 23:11:25 UTC, Jean Cesar wrote:
>> so I changed the code to use interface but how would I do so I 
>> could use the constructor in the same way as such a C ++ code?
>
> Interfaces + mixin templates give you something very similar to 
> multiple inheritance. You can have named functions in the mixin 
> templates that do the work of the constructor, then call them 
> from the real constructor.


Yes I saw here that it uses interface to make multiple 
inheritance just like C#, but I did not understand what would 
this mixing?


More information about the Digitalmars-d-learn mailing list