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

Imperatorn johan_forsberg_86 at hotmail.com
Thu Feb 4 12:27:49 UTC 2021


On Thursday, 4 February 2021 at 11:00:24 UTC, claptrap wrote:
> On Thursday, 4 February 2021 at 08:10:57 UTC, Ola Fosheim 
> Grøstad wrote:
>> On Wednesday, 27 January 2021 at 10:33:08 UTC, Mike Parker 
>> wrote:
>>> This is the discussion thread for the second round of 
>>> Community Review of DIP 1036, "String Interpolation Tuple 
>>> Literals":
>>
>> 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...
>
> Isn't the {} thing so you can do..
>
> i"i ate ${apples + bananas} of my 5 a day"
>
> Maybe it could allow
>
> i"i ate $apples apples today"
>
> too?

Or get rid of $ like in C# and have

i"I ate {nrOfApples} apples today" and
i"I ate {nrOfApples + nrOfOranges} fruits today"

Clean imo


More information about the Digitalmars-d mailing list