DIP 1027---String Interpolation---Community Review Round 1
Robert Schadek
rschadek at symmetryinvestments.com
Wed Dec 11 18:58:46 UTC 2019
I'm not really sure if the balance of added complexity vs. payoff
is in favor of payoff.
They only time I felt the need for such a feature was when I had
very long DelimitedStrings.
And those long strings where a constant source bugs, so I split
them up and the field need for interpolated strings want away
with the bugs.
Not being able to use * will stop me using this feature in many
places.
The rationale about "missing arguments, wrong format
specifier,... " Is a mute point IMO. format!"%d"(13.37) does the
same thing already without any language change.
I thought the idea was not to introduce language changes if a
library solution can do most of it already.
I find that the readability argument is highly subjective.
The first part of the rationale is, IHO,
already pointing to the solution. Short strings are easy to
manage.
So let's promote short strings in
combination with format!"%s" and
output ranges.
How will this feature work at CT.
Format doesn't even work completely at CT.
I know this goes a bit off topic,
but IMO this is a feature that is wanted,
because other languages have it.
And we want to say we have it too.
I think it's a lot nicer to say, we don't need this, because our
templates
can already do that.
TL/DR: not a fan
More information about the Digitalmars-d
mailing list