State of the Java Style Guidelines document
Jonathan Gibbons
jonathan.gibbons at oracle.com
Wed Jul 26 19:30:12 UTC 2017
Religious wars are waged over lesser issues.
I think it is presumptious to recommend a style for all Java code, but I
do think it is reasonable to establish coding guidelines for a specific
code base, such as OpenJDK. Even so, opinions will still differ, and
there was an attempt in Andreas' work to accommodate reasonable
alternatives, with a general proviso of, "when editing existing code
that has a consistent style, try to conform to that style, and not
slavishly conform to some different standard."
-- Jon
On 07/26/2017 12:21 PM, Jim Graham wrote:
> Sorry to sound like a broken record here - I think it should be
> published too, but... ;)
>
> If only it would adopt the convention used in much of 2D and FX of
> putting a brace on its own line after a line-wrapped
> conditional/method declaration (preferably as the primary form, but
> even as an acceptable alternative):
>
> public void longMethodNameUsedOnlyForIllustration(SomeLongClassName
> paramA,
> LongClassName paramB,
> int someOtherParam)
> throws OtherFormsAreUglySmileyFaceException
> {
> ...
> }
>
> provides the cleanest and clearest sight line to see where the body of
> the method/class/conditional starts...
>
> </broken record mode>
>
> ...jim
>
> On 7/26/17 3:21 AM, Remi Forax wrote:
>> I agree with Lars,
>> this should be published ASAP.
>>
>> regards,
>> Remi
>>
>>
>>
>>
>> On July 26, 2017 8:41:29 AM GMT+02:00, Lars Francke
>> <lars.francke at gmail.com> wrote:
>>> Hi everyone,
>>>
>>> I've been following the work Andreas Lundblad has done on the new Java
>>> Style Guidelines[1]. I know that he's not with Oracle anymore but the
>>> draft
>>> looks good (and has done so for at least a year), I think all comments
>>> have
>>> been worked into it. Why has it not been published? Is anyone working
>>> on
>>> this, if yes, who?
>>>
>>> I'd be happy to do any work needed to bring it to a final and published
>>> form if needed. But to me it looks ready to be published today (apart
>>> from
>>> a few minor issues I've reported to Andreas already).
>>>
>>> The old code conventions from 1997 can really use an updated version.
>>>
>>> Cheers,
>>> Lars
>>>
>>>
>>> [1] <http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html>
>>
More information about the discuss
mailing list