Java 21 makes me actually like Java again - WSCP's blog

submited by
Style Pass
2023-09-16 20:30:03

Whatever notation is used in this article does not represent how the math is usually presented. If you study this further or have already studied this subject, there may be mistakes, or terms I’ve used incorrectly. Please point out such mistakes in the comments, and I will update the article ASAP. Also, note that I’m borrowing the type theory notation from Wikipedia.

Java 21 will be released on September 19, 2023, supporting record patterns in switch blocks and expressions. Such syntax is monumental (At least, in Java land). It marks the point where Java could be considered to properly support functional programming patterns in ways similar to Kotlin, Rust, or C#. And it marks the first point where I can say, as a Kotlin developer, that I feel jealous.

Java has evolved rapidly in the past 10 years (As of 2023). Java 9 was the last “slow” release, as all subsequent releases happened 6 months apart. Below is a table showing Java updates over the past decade and the major syntactic changes/additions made in each version (Most changes are omitted to stay on topic).

Leave a Comment