RFR: 8012665: CharSequence.chars, CharSequence.codePoints
pbenedict at apache.org
Fri Apr 26 14:48:38 UTC 2013
Ulf, I have my opinions too on code style. However, the published
guidelines for Java code is what Oracle/Sun set out for themselves. AFAIK,
it is what's expected for JDK source.
On Fri, Apr 26, 2013 at 7:29 AM, Ulf Zibis <Ulf.Zibis at cosoco.de> wrote:
> I think, sometimes it is better to violate those 2 rules because:
> - modern wide-screens have much horizontal, but less vertical space,
> especially on labtops
> - line break for only one/few word(s) looks ugly, disturbs read-flow
> - it's no problem, if e.g. 1 of 50 lines must be scrolled a little
> horizontally, but it's a big problem if I have to vertically scroll twice
> often, when too much lines are "wasted". Comparing and understanding code
> then becomes a nightmare.
> Referring to your example, on the other hand, continuation lines should be
> indented 8 rather than 4 spaces to separate them from logical nesting.
> Especially your last line looks like less nested than the three before,
> which IMHO is a clear mistake.
> Am 25.04.2013 22:57, schrieb Paul Benedict:
>> I believe the coding standards require curly braces for any if-statement
>> and for-loop.
>> Also the return statements exceed the 80 character limit. It would be nice
>> to have them formatted across several lines like the following because
>> difficult to read going straight across:
>> return StreamSupport.intStream(() ->
>> new CharIterator(),
>> Spliterator.SUBSIZED | Spliterator.SIZED | Spliterator.ORDERED);
More information about the core-libs-dev