String reboot - (1a) incidental whitespace
John Rose
john.r.rose at oracle.com
Thu Apr 18 23:39:45 UTC 2019
On Apr 18, 2019, at 5:43 AM, Jim Laskey <james.laskey at oracle.com> wrote:
>
> What kills the concept is that ODI is not reproducible in a library method.
That also impacts the concept of using escapes to opt out,
since the library method cannot see escapes, while the
compiler can see them.
I suggest the following rule: If the string contains
quoted whitespace (especially \n and \040, maybe
others), then the compiler does *not* call the library
routine to strip leading spaces. Thus, visibly taking
control of at least one element of whitespace in the
body of the string constitutes an opt-out from
any edits to the remaining whitespace.
Thus, *if* javac hands the string to the library method,
we already know that the library method won't be
meddling with escaped spaces or newlines.
More information about the amber-spec-experts
mailing list