DIP 1027---String Interpolation---Format Assessment

FeepingCreature feepingcreature at gmail.com
Thu Feb 27 06:38:14 UTC 2020

On Thursday, 27 February 2020 at 03:50:35 UTC, Walter Bright 
> On 2/26/2020 4:46 PM, Adam D. Ruppe wrote:
>> But DIP1027 had a fatal flaw: it made type safety impossible.
> I don't see how that is true.

Because it turned a format string into a list of built-in types 
indistinguishable from a set of manual parameters. You cannot in 
principle tell the difference between "test $i" and ("test %s", 
i) - you cannot write a function that takes a string and then 
*any other type* and is also protected from being accidentally 
called with a format string.

Features should be as simple as they can be, but no simpler. - 
The point of simplicity is predictability. DIP1027 is so simple 
that it crosses back into surprising.

More information about the Digitalmars-d-announce mailing list