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

Paul Backus snarwin at gmail.com
Fri Sep 11 18:32:05 UTC 2020

On Friday, 11 September 2020 at 18:24:25 UTC, Adam D. Ruppe wrote:
> On Friday, 11 September 2020 at 18:16:10 UTC, Paul Backus wrote:
>> The main difference is that the Javascript system uses a 
>> regular-old Javascript list for its "spec object", rather than 
>> an opaque runtime-defined type.
> Frankly, I hate the opaque thing too and it is going to change. 
> In my mind, it *must* be introspectable to be useful (without 
> that, it also fails test #8 btw).
> The sample implementation in the DIP its all these points, but 
> the spec text doesn't. We had a hard time figuring out how to 
> word it in spec-ese  and kinda gave up, but it is obvious that 
> giving up on that was a major mistake that we're going to go 
> back and correct after this feedback round.

Okay, here's my follow-up question:

D already has two widely-used conventions for passing "string 
data with other stuff in the middle" to a function. The first is 
to use a format string as the first argument, followed by all the 
other bits of "stuff" as the rest of the argument list. The 
second is to break the string into pieces, and insert the other 
bits of "stuff" into the argument list between those string 

What do we gain by adopting a *third* convention from Javascript? 
Aren't the two we have already enough?

More information about the Digitalmars-d mailing list