Skip to content
Artwork for Inside Java
Inside Java · Yesterday · 53 min

"Immutable Data Beyond Value Classes" [AtA]

Object-Oriented Programming offers a lot of flexibility for modelling diverse domains but not all elements need that flexibility. Data, specifically, is often better modeled by simple, immutable types and while OOP does not prevent that, it can make it a bit cumbersome. So in recent and coming years, Java has gained and will gain a number of features that improve the situation: From flexible constructor bodies to records and value classes, from withers to lazy constants, and more - they all stand on their own, but they also come together to allow us to more expressively and elegantly define, construct, copy, and access immutable data. In this "Ask the Architects" episode of the Inside Java Podcast, recorded during JavaOne 2026, Nicolai Parlog talks to Dan Smith, contributor to projects Amber and Valhalla and Senior Java Platform Developer at Oracle. Show Notes: Better Tools for Immutable Data: https://www.youtube.com/watch?v=BdLND9D81lI JEP 513: Flexible Constructor Bodies: https://openjdk.org/jeps/513 JEP 401: Value Objects (Preview): https://openjdk.org/jeps/401 JEP 468: Derived Record Creation (Preview): https://openjdk.org/jeps/468 JEP 547: Lazy Constants (Fourth Preview): https://openjdk.org/jeps/547

0:00-53:43

transcript

No transcript — this publisher did not publish one.

show notes

Object-Oriented Programming offers a lot of flexibility for modelling diverse domains but not all elements need that flexibility. Data, specifically, is often better modeled by simple, immutable types and while OOP does not prevent that, it can make it a bit cumbersome. So in recent and coming years, Java has gained and will gain a number of features that improve the situation: From flexible constructor bodies to records and value classes, from withers to lazy constants, and more - they all stand on their own, but they also come together to allow us to more expressively and elegantly define, construct, copy, and access immutable data.

In this "Ask the Architects" episode of the Inside Java Podcast, recorded during JavaOne 2026, Nicolai Parlog talks to Dan Smith, contributor to projects Amber and Valhalla and Senior Java Platform Developer at Oracle.

Show Notes:

links5