The state of string interpolation

Dennis dkorpel at gmail.com
Thu Dec 6 09:01:03 UTC 2018


On Thursday, 6 December 2018 at 02:14:12 UTC, Neia Neutuladh 
wrote:
> However, that would also force druntime to include formatting 
> code that it currently lacks.

Jonathan Marler's implementation [1] has a really nice approach 
of lowering interpolated strings to tuples. You can pass it to 
variadic functions like `writeln` or `text` and bring your own 
formatting / memory allocation schemes, giving better performance 
and flexibility.

[1] https://github.com/dlang/dmd/pull/7988


More information about the Digitalmars-d mailing list