RFR: JDK-8198986 - 3.10.7: Raw string literals

Paul Sandoz paul.sandoz at oracle.com
Wed Mar 14 19:06:58 UTC 2018



> On Mar 14, 2018, at 11:23 AM, Brian Goetz <brian.goetz at Oracle.COM> wrote:
> 
> Stepping out of the micro-syntactic morass, the primary goal of this feature is to make it possible to take a well-formed snippet of some other language (SQL, Regex, JSON, HTML, Python, whatever) and embed it, _free of the need to do any localized fixups_, in Java code. 

And also extract it _free of the need to revert any local fixups_.

Further, it more easily enables some parser to directly operate on that source (e.g. what if the IDE recognizes the string literal contents as SQL or even Java source? perhaps it could provide syntax highlighting and basic correction?).

Further, when using an IDE it’s easy to underestimate how useful tools like grep are.

Paul.


More information about the amber-dev mailing list