D mixins

mike vertex at gmx.at
Thu Jan 4 17:55:24 PST 2007


Am 05.01.2007, 00:19 Uhr, schrieb Waldemar <waldemar at wa-ba.com>:

>> >> 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?
>
> Roughly speaking, anytime you see a multiline #define macro in  
> C++ (especially
> with parameters), you would use a mixin in D.
>
> That's only one sample use, but it should speak to the Cplusplusers.
>

Erm ... I don't think you can insert this line via a mixin into a certain  
scope:

' scope (failure) dosomething();

But, please, tell me I'm wrong, I would really need that :)

-mike

-- 
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/



More information about the Digitalmars-d mailing list