D mixins
Chris Nicholson-Sauls
ibisbasenji at gmail.com
Thu Jan 4 12:44:38 PST 2007
janderson wrote:
> 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
I think the Signals/Slots implementation in Phobos is a good example.
-- Chris Nicholson-Sauls
More information about the Digitalmars-d
mailing list