Discussion Thread: DIP 1036--String Interpolation Tuple Literals--Community Review Round 2
Imperatorn
johan_forsberg_86 at hotmail.com
Tue Feb 2 18:41:37 UTC 2021
On Tuesday, 2 February 2021 at 14:45:05 UTC, claptrap wrote:
> On Tuesday, 2 February 2021 at 06:22:11 UTC, Walter Bright
> wrote:
>> On 1/31/2021 3:04 AM, claptrap wrote:
>>> Why is "working with printf" so important?
>>
>> It's a canary. printf has a very simple interface, and if
>> string interpolation doesn't work for simple cases, it is
>> indicative of complexity problems.
>
> Making the DIP work with printf wont make it work with all
> simple interfaces. So printf is not "a canary for simple
> interfaces". All it actually does is make it work with a very
> specific subset of "simple interfaces" at the expense of all
> others.
>
> You solved the equations for one variable, but you still have 3
> unknowns.
>
>
>> Along with, of course, everybody uses printf and printf-style
>> functions (dmd has many), and writef also uses a printf-style
>> format.
>
> I dont, I have a few custom wrapper functions for formatting
> floats, and i use writeln.
>
>
>> I emphasize that #DIP1027 knows nothing about printf or its
>> formats, other than having the default format be `%s`. The
>> default can, of course, be overridden.
>>
>> Again, DIP1027 KNOWS NOTHING ABOUT PRINTF OR ITS FORMATS.
>
> I dont like either proposal tbh.
Anyway you look at this it seems there's no clear concensus on
how it should work.
I really want this to pass, but not if there are many corner
cases and/or special rules to follow.
It should be as simple as possible while also being as powerful
as possible. It's a tough balance.
More information about the Digitalmars-d
mailing list