DIP 1027--String Interpolation--Final Review Feedback Thread

Paul Backus snarwin at gmail.com
Mon Feb 3 18:21:44 UTC 2020


On Monday, 3 February 2020 at 18:04:33 UTC, Arine wrote:
> Amendments to my feedback:
>
> 6) @nogc should be better supported, supporting C functions 
> isn't sufficient as they lack functionality for custom types. 
> Using .toString() isn't sufficient especially when performance 
> is a requirement. It causes additional allocations/copying that 
> could otherwise be avoided with more robust solution that 
> builds the string in the output buffer.

std.format.formattedWrite [1] can do this if you pass it an 
appropriate output range as its first argument.

[1] https://dlang.org/phobos/std_format.html#formattedWrite


More information about the Digitalmars-d mailing list