styleguide icon indicating copy to clipboard operation
styleguide copied to clipboard

Update Java Style Guide for Java 17

Open DJViking opened this issue 3 years ago • 3 comments

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.

DJViking avatar Jan 20 '21 18:01 DJViking

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.

elharo avatar Aug 26 '21 18:08 elharo

Even some Java 11 features like var are not mentioned, though.

benjaminp avatar Aug 26 '21 20:08 benjaminp

It would be good then to let the reader know that the guide applies only to the pre-17 (or pre-11?) constructs.

oliviercailloux avatar Mar 20 '23 19:03 oliviercailloux