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

Arine arine123445128843 at gmail.com
Mon Feb 3 18:04:33 UTC 2020


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.


In addition to points 3/4:

> The DIP is carefully designed to not need to know anything 
> about format strings.

This is exactly the problem. Relevant **required** information is 
purposefully being withheld from the DIP. I don't agree with it, 
anyone that wants to do anything more than just use printf and 
friends needs to know the exact details of the implementation.

> D can (and probably should) add such an extension, but it would 
> be orthogonal to this DIP and should be addressed separately.

It is an extension in C++, but it isn't a language feature in 
C++. This flies parallel with this DIP which brings printf 
formatting into the core specification as a language feature. It 
should be included as part of this DIP, or interpolated strings 
shouldn't use printf formatting.






More information about the Digitalmars-d mailing list