[ string literals ] Extending the escape language (was: String literals: some principles)

John Rose john.r.rose at oracle.com
Wed May 8 22:31:35 UTC 2019

On May 8, 2019, at 1:31 PM, Guy Steele <guy.steele at oracle.com> wrote:
> True.  Then there are the separate questions of (a) whether it is less confusing to Joe Programmer to accept \<eol> but reject \<hspace>+<eol>, or to make \<hspace>+<eol> “just work”, and (b) what are costs of making \<hspace>+<eol> “just work”.

Deprecating invisible whitespace before <eol> is a
common practice.  The OpenJDK repos reject this
along with leading tabs and other visual ambiguities.

Come to think of it, this common practice is...
 - evidence that Joe P. already knows <hws><eol> isn't quite kosher.
 - evidence that <hws><eol> *shouldn't* be a *significant* part of a new Java syntax!
 - *not* necessarily a candidate for enforcement at the language level.

(The middle point supports <\ s> against <\ space> as a
candidate escape sequence!)

More information about the amber-spec-experts mailing list