RFR: CSR JDK-8233117 Escape Sequences For Line Continuation and White Space (Preview)
John Rose
john.r.rose at oracle.com
Tue Nov 5 18:35:45 UTC 2019
On Nov 5, 2019, at 10:17 AM, Remi Forax <forax at univ-mlv.fr> wrote:
>
> the rationale to add \<newline> is well explain but why do you want to introduce \s given we already have \u0020 ?
Remi, you are an expert in the field and you got fooled! This is *exactly* why we need \s.
The \uXXXX syntax is expanded *before* token scanning, which means that the poor programmer
who tries \u0020 will see it stripped by the whitespace stripper. Using \uXXXX where XXXX is
an ASCII code point is an anti-pattern! (I think we would help our users if we deprecated it.)
You might have said \040, but that too is hard to remember and to read and to use correctly.
\s is the answer.
— John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20191105/5716e054/attachment.html>
More information about the compiler-dev
mailing list