The state of string interpolation...one year later

Meta jared771 at gmail.com
Mon Mar 18 16:30:26 UTC 2019


On Monday, 18 March 2019 at 09:07:26 UTC, Olivier FAURE wrote:
> On Sunday, 17 March 2019 at 06:01:35 UTC, Jonathan Marler wrote:
>> https://github.com/dlang/dmd/pull/7988
>
> By the way, quick question, how does the PR handle this case?
>
>     i"$a $b" ~ i$"c $d"

Also, recursive use of interpolated strings. Does this work or 
fail with a compiler error like "can't find symbol c":

int a = 2, b = 5;
enum code = text(i"mixin(\"int c = $(a + b)\"); writeln(i\"a = 
$a, b = $b, c = $c\");");
mixin(code);




More information about the Digitalmars-d mailing list