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:24:56 UTC 2021


On Thursday, 4 February 2021 at 10:38:00 UTC, ddcovery wrote:
> On Thursday, 4 February 2021 at 08:10:57 UTC, Ola Fosheim 
> Grøstad wrote:
>
>> The whole "${}" thing is too verbose, it reminds me of the 
>> JavaScript variant which is basically no easier to read than 
>> concatenation.  Python got it mostly right...
>>
>
> In my opinion,
>
>   `${a} plus ${b} is ${a+b}`
>
> is definitely easier to read than
>
>   "" + a + " plus " + b + " is " + (a+b)
>
>
> Dart
>   "${a} plus ${b} is ${a+b}"
>   or
>   "$a plus $b is ${a+b}"
>
> Kotlin
>   "${a} plus ${b} is ${a+b}"
>   or
>   "$a plus $b is ${a+b}"
>
> Javascript/Typescript
>   `${a} plus ${b} is ${a+b}`

Python:

f'{a} plus {b} is {a+b}'




More information about the Digitalmars-d mailing list