div0:

> Mixins do pretty much same thing but in reverse, mixins pull stuff right
> into the class, and with a mixin it's the class which is imposing the
> meta interface on the mixin.
> 
> As you pointed out though, CRTP nukes your inheritance slot in D, so
> you'd generally prefer mixins in D. CRTP isn't going to give you any
> advantage that I can see, you just have to do your design the other way
> round than you would in c++.

Thank you to all the people that have answered me.
Mixins have an advantage: I have understood them in minutes and then I have 
used them. While I haven't undertood CRTP that quickly :-)

Bye,
bearophile

Reply via email to