styleguide
styleguide copied to clipboard
Update Java Style Guide for Java 17
The next Java LTS, Java 17 is coming later this year.
There is no information on which version of Java the Google Java Style Guide adheres to. It doesn't look like it has been updated to incorporate the new language features that has been added to newer Java.
There is nothing about Java modules mentioned in the style guide.
There is nothing about the new language features, like var
, Switch Expressions
, Records
, Text Blocks
, Sealed Classes
, Hidden Classes
, Pattern matching instanceof
.
Though some of these new features are still in First or Second Preview as of Java 16 coming in March 2021.
This is not going to happen until Google starts using Java 17 or later itself, which is unlikely anytime soon. I think we're now on a mix of Java 8 and Java 11, and even occasionally Java 7, depending on the project.
Even some Java 11 features like var
are not mentioned, though.
It would be good then to let the reader know that the guide applies only to the pre-17 (or pre-11?) constructs.