The state of string interpolation

Adam D. Ruppe destructionator at gmail.com
Thu Dec 6 00:32:48 UTC 2018


On Thursday, 6 December 2018 at 00:20:53 UTC, H. S. Teoh wrote:
> Why can't this be added to to code.dlang.org as a library / dub 
> package / whatever?

Library things cannot access the local scope of the string unless 
you mixin.

So

mixin(interp!"foo #{a}");

is doable as a library (and I know Nick Sabalusky's scriptlike 
has it, probably among others), but

string b = "foo #{a}";

is only doable as a language feature.


More information about the Digitalmars-d mailing list