4 ms·
C# introduced `#nullable enable` to change the behaviour of reference types. Java could do the same to change the behaviour of `$` inside a string (along with
by david_allison 3y ago
C# introduced `#nullable enable` to change the behaviour of reference types.
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-migration-strategies https://learn.microsoft.com/en-us/dotnet/csharp/nullable-mig...
- ghusbands 3y agoIt'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} """}"