www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - mixin.stringof

I propose that stringof be allowed on mixins so that they return,
as a string, the "output of the mixin" (if it is a string mixin
then it just returns the string of the mixin)

This will make using mixins much easier for intellisense and
debugging purposes.


template A!(B) { class C : B { } }

mixin A!(Q); // inserts the class C : Q

enum e = mixin.stringof A!(Q); // returns as a string "class C :
Q { }"

Obviously there may be better ways but anything is better than
Jan 28 2014