|
|
|
|
|
by spankalee
1203 days ago
|
|
I don't understand this rationale either: > For the syntax of embedded expressions we considered using ${...}, but that would require a tag on string templates (either a prefix or a delimiter other than ") to avoid conflicts with legacy code. Can't the template processor expression itself function as the tag? Is STR."..." already legal now? |
|
———
However, what they could have done instead is to use a syntax like
i.e. place the interpolated expressions outside of string literals. Slightly longer, but maybe more readable and typable, and currently invalid syntax. (The parentheses would be mandatory.)