Discussion Thread: DIP 1036--Formatted String Tuple Literals--Community Review Round 1

Paul Backus snarwin at gmail.com
Sat Sep 12 11:21:10 UTC 2020


On Saturday, 12 September 2020 at 07:49:49 UTC, Aliak wrote:
>
> Requiring to retype int semantically for every function that 
> has a string followed by an int to avoid “non-obvious” affects 
> of a language feature seems seems a bit overkill.

Nobody is required to do anything. My point is, this kind of 
function is prone to accidental usage *with or without* string 
interpolation, and making the argument list more strongly typed 
is an effective technique for fixing that.

Of course, you can also decide that the consequences of 
accidental usage are not a big deal, and that you're willing to 
live with them for the sake of convenience. I think that's a 
totally reasonable decision to make, especially for @safe 
functions.

Adding additional complexity to string interpolation to 
compensate for deficiencies in library interfaces is not good 
design. Problems should be addressed at their source.


More information about the Digitalmars-d mailing list