3 ms·
>However, this would force developers to escape every $ sign in the literal text of a string template while continuing to write $ without escapes in string lite
by coldtea 3y ago
>However, this would force developers to escape every $ sign in the literal text of a string template while continuing to write $ without escapes in string literals and text blocks.
The other side is that now they'll make them think they can also write \{foo} in string literals and text blocks, and they'll find out it doesn't work.
- masklinn 3y agoI would assume that will keep being a compilation error. It also seems to be a very "think of the morons" point to raise.
- coltonweaver 3y agoCorrect, this example is also in the JEP: String name = "Joan"; String info = "My name is \{name}"; | error: processor missing from template expression