Re: Escape Sequences For Managing Whitespace (Preview)

2019-08-19 Thread Brian Goetz
In an earlier round there was a pair of methods, which were variously called escape/unescape, encode/decodeEscapes, etc. No one could remember which was in which direction … there is currently not such a method. > On Aug 19, 2019, at 8:18 PM, Joe Darcy wrote: > > Hello, > > Are there plans f

Re: Escape Sequences For Managing Whitespace (Preview)

2019-08-19 Thread Joe Darcy
Hello, Are there plans for methods to take a string and produce value-preserving escape sequence encodings of it, quoting trailing whitespace, etc.? Cheers, -Joe On 8/13/2019 5:46 AM, Jim Laskey wrote: https://bugs.openjdk.java.net/browse/JDK-8227870

Re: Escape Sequences For Managing Whitespace (Preview)

2019-08-15 Thread Guy Steele
> On Aug 15, 2019, at 11:19 AM, Jim Laskey wrote: > > Assuming the proposal is (keep last white space), I see the > light but I see the dark here as well (and maybe not enough here to switch > horses.) > > String hexData = """ > 000102030405060708090a0b0c0d0e0f101112131415 \ >

Re: Escape Sequences For Managing Whitespace (Preview)

2019-08-15 Thread Jim Laskey
s/What does do you do here?/What so you do here/ > On Aug 15, 2019, at 12:19 PM, Jim Laskey wrote: > > Assuming the proposal is (keep last white space), I see the > light but I see the dark here as well (and maybe not enough here to switch > horses.) > > String hexData = """ > 00

Re: Escape Sequences For Managing Whitespace (Preview)

2019-08-15 Thread Jim Laskey
Assuming the proposal is (keep last white space), I see the light but I see the dark here as well (and maybe not enough here to switch horses.) String hexData = """ 000102030405060708090a0b0c0d0e0f101112131415 \ 161718191a1b1c1d1e1f202122232425262728292a2b2c \ 2d2e2f303132

Re: Escape Sequences For Managing Whitespace (Preview)

2019-08-14 Thread John Rose
On Aug 13, 2019, at 10:29 AM, John Rose wrote: > > So I suggest deleting all of where LWS is either space or > tab, unescaped of course. > Just to be clear about my suggestion for stripping additional incidental whitespace before and/or after <\ LT>, here’s an example for using a rule that

Re: Escape Sequences For Managing Whitespace (Preview)

2019-08-14 Thread Jim Laskey
Thank you Alex. > On Aug 13, 2019, at 5:51 PM, Alex Buckley wrote: > > - Title: "Escape Sequences for Line Continuation and White Space (Preview)" > (the narrative term is "white space" per the JLS and JEP 355; the only time > the ` ` character after "white" is missing is in the name of the g

Re: Escape Sequences For Managing Whitespace (Preview)

2019-08-13 Thread Alex Buckley
- Title: "Escape Sequences for Line Continuation and White Space (Preview)" (the narrative term is "white space" per the JLS and JEP 355; the only time the ` ` character after "white" is missing is in the name of the grammar production WhiteSpace) - Goal: "Improve the the observability of the

Re: Escape Sequences For Managing Whitespace (Preview)

2019-08-13 Thread John Rose
+100 One nit: <\ u 0 0 2 0> is not an escape sequence and so should not be displayed next to <\ 0 4 0>. The former is processed before tokenization globally while the latter is processed inside strings only. This confusing fact is an additional motivation for <\ s> since most people don’t kno