Discussion Thread: DIP 1036--String Interpolation Tuple Literals--Community Review Round 2

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Thu Feb 4 15:39:53 UTC 2021


On Thursday, 4 February 2021 at 10:38:00 UTC, ddcovery wrote:
> In my opinion,
>
>   `${a} plus ${b} is ${a+b}`
>
> is definitely easier to read than
>
>   "" + a + " plus " + b + " is " + (a+b)

I don't think it is a big difference, of course, JavaScript also 
converts to string automagically, which makes string 
interpolation much less useful. Often it is sufficient to just do:

[a, 'plus', b, 'is', a+b].join(' ')




More information about the Digitalmars-d mailing list