From Java 17 to 21 and Beyond: Data Oriented Programming, Asynchronous Programming, and Value Types

The two-years release cadence of LTS versions gives the entire Java ecosystem the opportunity to accelerate. It also brings the new features Java has to offer faster, so that developers can improve applications readability, maintainability as well as development productivity. Let us cover three of the new features of the JDK: data oriented programming, virtual threads, and value types.

  • Data oriented programming is brought by Project Amber. Its main feature is the introduction of pattern matching, which is the next revolution of the language, after the introduction of generics in 5 and lambda expressions in 8.
  • Virtual threads is a finalized feature of JDK 21 brought by Project Loom. It brings a new concurrent and asynchronous programming model to the Java platform. Along with structured concurrency, a preview feature of JDK 21, it will give you new ways to write asynchronous code, with improved readability and better performances.
  • Value types are brought by Project Valhalla. It is about optimizing the laying out of certain objects in memory, to save memory and to optimize the access to values. With this upcoming feature, you will not have to choose between well-modeled, readable code, and performance. Let us see how all this is working, the new patterns you will be able to use, and the performance you may expect.