RFR: 8012665: CharSequence.chars, CharSequence.codePoints

Ulf Zibis Ulf.Zibis at CoSoCo.de
Thu May 2 09:55:27 UTC 2013

Thanks for your opinion, Paul.

Looking into the existing sources, violation of the 80 character limit seems widely accepted, so to 
me it seems reasonable to continue this style in appropriate cases.

But I rarely see good reasons to violate the 8-spaces indentation rule for continuation lines.


Am 26.04.2013 16:48, schrieb Paul Benedict:
> 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 <mailto: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.
>     -Ulf
>     Am 25.04.2013 22:57, schrieb Paul Benedict:
>         Henry,
>         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 it's
>         difficult to read going straight across:
>         return StreamSupport.intStream(() ->
>                  Spliterators.spliterator(
>                      new CharIterator(),
>                      length(),
>                      Spliterator.ORDERED),
>                  Spliterator.SUBSIZED | Spliterator.SIZED | Spliterator.ORDERED);
>         Paul

More information about the core-libs-dev mailing list