Hacker News new | ask | show | jobs
by sitta 984 days ago
> I actually feel like very little has been added between Java 8 and Java 21.

var, records, sealed types, and pattern matching make a huge difference in how Java is written. A lot has changed since 8.

2 comments

This is a pretty unimpressive list for 9 years of progress, and is merely a small subset of features Kotlin was already providing.

I left the Java world for the C# world around 2008 and then returned to the Java world last year. C#/.NET changed much more significantly much faster. Almost all of the significant differences in day to day life with respect to the Java language and standard libraries that occurred between 2008 and 2022 are due to changes introduced with Java 8.

The issue with these new structures is they're necessarily clunky, to maintain interoperability with non-modern Java. Java's backwards compatibility is legendary, but is also why some of it's newer features are often criticized as not being as good as they could be.
It's one thing to say, "very little has been added between Java 8 and Java 21," and something else entirely to say, "newer features are often criticized as not being as good as they could be [to maintain backwards compatibility]."
I don’t think any of then is clunky - hell, pattern matching is straight better in java.