Re: String reboot - (1a) incidental whitespace

2019-04-22 Thread Guy Steele
Good points. Like I said, I think we are in agreement! —Guy > On Apr 22, 2019, at 8:00 PM, Alex Buckley wrote: > > On 4/22/2019 12:16 PM, Guy Steele wrote: >>> On Apr 22, 2019, at 3:04 PM, Alex Buckley >>> wrote: >>> >>> Nope, I don't think multi-line string literals are an attractive >>>

Re: String reboot - (1a) incidental whitespace

2019-04-22 Thread Alex Buckley
On 4/22/2019 12:16 PM, Guy Steele wrote: On Apr 22, 2019, at 3:04 PM, Alex Buckley wrote: Nope, I don't think multi-line string literals are an attractive nuisance in any way. We should NOT deem it incorrect to refactor a sequence of concatenations into a single multi-line string literal. I

A library for implementing equals and hashCode

2019-04-22 Thread Liam Miller-Cushon
Please consider this proposal for a library to help implement equals and hashCode. The doc includes a discussion of the motivation for adding such an API to the JDK, a map of the design space, and some thoughts on the subset of that space which might be most interesting:

Re: Alignment algorithm (was: Wrapping up the first two courses)

2019-04-22 Thread Jim Laskey
> On Apr 22, 2019, at 1:04 PM, Brian Goetz wrote: > > > > On 4/22/2019 11:26 AM, Jim Laskey wrote: >> >> 2. long count = lines().count(); >>if (count == 1) { >>return strip(); >>} >> >> Single line strings (no line terminators) are simply stripped. >> >> """ single

Alignment algorithm (was: Wrapping up the first two courses)

2019-04-22 Thread Brian Goetz
On 4/22/2019 11:26 AM, Jim Laskey wrote: Current "strip incidentals" algorithm as captured in String::align (string-tapas branch)     public String align(int n) {         if (isEmpty()) { return "";         }         long count = lines().count();         if (count == 1) { return strip();    

Re: Wrapping up the first two courses

2019-04-22 Thread Jim Laskey
Current "strip incidentals" algorithm as captured in String::align (string-tapas branch) public String align(int n) { if (isEmpty()) { return ""; } long count = lines().count(); if (count == 1) { return strip(); } int

Wrapping up the first two courses

2019-04-22 Thread Brian Goetz
> The main thing Brian is waiting for, though, is not lots of new ideas, > but rather a consensus that (a) we can treat leading whitespace outside > of a given rectangle as syntax-not-payload (thus stripped), and (b) that > we should provide a way for programmers to opt out of the stripping >