DIP 1027---String Interpolation---Community Review Round 1

Adam D. Ruppe destructionator at gmail.com
Sun Dec 15 20:32:38 UTC 2019

On Sunday, 15 December 2019 at 18:25:40 UTC, Guillaume Piolat 
> If you answer "with the GC", then this feature requires the 
> runtime...

That's exactly what mine would do.

But at the same time, with mine, you could *also* do

snprintf(buffer.ptr, buffer.length, i"foo %bar".c.tupleof);

Check out a draft hacky 100% library implementation here:

the compiler can do a slightly better job avoiding the copying of 
values (the library can too... but not if you also want all 
three: RT+CT compat, C function compat, and expressions in the 
interpolated string. It is a kinda pick any two. Unless I'm 
missing a cool trick. But the compiler can express more than the 

More information about the Digitalmars-d mailing list