Re:Java String Interpolation final in Java 23
by ghusbands on Saturday January 13, 2024 @10:21AM
(#38980718)
It's moot, anyway, as parser changes are already required by the STR." part. About the only possible defence is that one could use the same lexer, but even that's not true because you can presumably now embed a multi-line string in a single-line string, like so:
STR."\{STR."""
\{hey}
"""}"
Java could do the same to change the behaviour of `$` inside a string (along with a project-level config to make this the default).
Let developers opt-in to better syntax, rather than using significantly worse syntax to support legacy code
https://learn.microsoft.com/en-us/dotnet/csharp/nullable-mig...