Discussion Thread: DIP 1036--String Interpolation Tuple Literals--Community Review Round 2
Adam D. Ruppe
destructionator at gmail.com
Thu Feb 4 13:49:30 UTC 2021
On Thursday, 4 February 2021 at 13:37:32 UTC, Imperatorn wrote:
> In the example you provided, it depends on what character is
> used. If { and } are used (instead of $), you need to escape
> those by { and }.
Don't you see how that would make the string uglier and harder to
use correctly by forcing escaping of an extremely common
sequence? Remember, this is used with D code, along side curly
brace syntax and the $ operator in slices, as well as for
ordinary strings that use $ to mean a bunch of other things.
${} is unambiguous in token strings and much more clear in normal
strings.
More information about the Digitalmars-d
mailing list