Playing arround with mixin - alias?
Martin Tschierschke via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Apr 21 05:09:12 PDT 2017
On Friday, 21 April 2017 at 11:58:13 UTC, Martin Tschierschke
wrote:
> On Friday, 21 April 2017 at 10:31:46 UTC, ketmar wrote:
>> biozic wrote:
I thought way to complicated:
Just define the string at top:
enum exho="auto mixinter(string x)(){return mixin(interp!x);}
auto exho(string x)(){return
mixin(\"writeln(\"~interp!x~\")\");}";
Then use:
mixin(exho);
exho!"${name} you are app. ${age*365} days old";
In your scope!
More information about the Digitalmars-d-learn
mailing list