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

Adam D. Ruppe destructionator at gmail.com
Thu Feb 4 12:56:14 UTC 2021


On Thursday, 4 February 2021 at 12:27:49 UTC, Imperatorn wrote:
> 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

Note that we chose the sequence ${expr} to avoid duplicating 
standard uses of symbols inside strings.

This next bit isn't in the dip but Just using {} alone would 
conflict with tons of D syntax.

mixin(iq{ void foo() { is this a function body or an interpolated 
section? } });



More information about the Digitalmars-d mailing list