D mixins

janderson askme at me.com
Thu Jan 4 09:15:59 PST 2007


Lutger wrote:
> janderson wrote:
>> I'm trying to explain to a friend on msn what mixins are.  Can you
>> provide some good examples, that would be difficult otherwise?
>>
>> -Joel
> 
> What about implementing multiple inheritance in a language that does not 
> have multiple inheritance? (interface + mixin as default implementation)

Thanks for your reply.

Well coming from C++ this would not make much sense.  Where would you 
use them in C++?  Where would you use them in D?  Are there any good D 
examples that show the power of mixins in a simple way that would be 
more ugly another way?

Cheers.
-Joel



More information about the Digitalmars-d mailing list