Re:Java String Interpolation final in Java 23
by masklinn on Saturday January 13, 2024 @10:11AM
(#38980619)
I would assume that will keep being a compilation error.
It also seems to be a very "think of the morons" point to raise.
Re:Java String Interpolation final in Java 23
by coltonweaver on Saturday January 13, 2024 @10:12AM
(#38980627)
Correct, this example is also in the JEP:
String name = "Joan";
String info = "My name is \{name}";
| error: processor missing from template expression
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.