Session
Value Objects - the next big thing in Java
One of the great advantages of Java was and is the static, strong type system. This helps millions of developers detect errors at compile time and makes development more robust and efficient. However, Java's distinction between primitive and reference types has been a heavy burden. The primitive data types introduced around 30 years ago for performance reasons do not integrate well with modern approaches such as generics, stream API or pattern matching.
Value Objects will provide a remedy and combine the advantages of both worlds. This will allow us to design immutable data types (state and behavior, but without their own identity) that behave like primitive data types. This not only increases performance and reduces memory consumption, it also increases readability and maintainability, as we can then define expressive yet performant types much more easily according to the ideas of DDD.
The project Valhalla has been working on this major change to Java's type system for around 10 years. There are a number of complex issues involved, such as how to handle default values and null values, the conversion of wrapper types, and the use of generic typing. In the summer of 2024, Java's Language architect Brian Goetz announced that after a long time, a breakthrough in implementation had been achieved. So let's take a look together at how value classes, null-restricted and nullable types, and extended primitive boxing will change the way we program in the future.
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top