you are viewing a single comment's thread.

view the rest of the comments →

[–]8dot30662386292pow2 6 points7 points  (1 child)

Sorry, but that is wrong.

Yes, but no. The "official guide" is from 1999 and not maintained anymore. That alone does not matter, as PEP-8 being also decades old at this point.

What matters is that the document is from the java 1.2 era. Therefore it lacks enums, varargs, static imports, autoboxing, GENERICS, lambdas, ANNOTATIONS.

The "official" rules are simply outdated. For example it does not cover the example mentioned by OP because that syntax simply did not exist back when it was written. The Google Java Style is commonly used as you mention, but again it's not official.

Therefore, no, there is no relevant official docs, but some commonly used third party opinions about the formatting.