D mixins

Waldemar waldemar at wa-ba.com
Thu Jan 4 15:19:23 PST 2007


> >> 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.




More information about the Digitalmars-d mailing list