!["Carrier Classes" [IJN]](https://static.libsyn.com/p/assets/4/6/4/7/46478bd3f0a0653d16c3140a3186d450/Cover-47FINAL.png)
Episode 3 · Season 3
"Carrier Classes" [IJN]
About this episode
This episode presents Project Amber lead Brian Goetz's recent email "Data Oriented Programming, Beyond Records", wherein he describes plans to improve Java's data handling capabilities by introducing carrier classes, a generalization of records. Like them, carrier classes describe their state through a component list that defines the type's external API: accessors, a constructor, and matching deconstructor - this allows carrier classes to participate in pattern matching and reconstruction. Unlike records, the implementation of this API remains the developer's task although component fields offer a shortcut for the common case where the API does map to a field. Carrier classes don't have to be final (and can hence participate in inheritance) and neither do their fields (so they can be mutable data carriers).
The email also mentions carrier interfaces, allowing records to be abstract as well as a relaxation of deconstruction patterns that make them more amenable to evolution of the matched type. This episode also briefly touches on Gavin Bierman's mail to the Project Amber mailing list that announces pattern assignments and constant patterns.
More from Inside Java
A discussion of Java's expanding support for AI workloads: From its strengths in adding AI features to existing applications to new capabilities for writing Java code that runs on GPUs; from having Ja…
JDK 28's adaptive heap sizing for ZGC dynamically balances CPU use and memory consumption with close-to-zero configuration. Value classes introduce new challenges for conversions between custom numeri…
This episode of the Inside Java Podcast is the Ask the Architect session from Devoxx Belgium 2026, where the audience members literally asked the Java architects their questions. They inquired about c…
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…
On August 18th, 2026 a mail pops up on the hotspot-compiler-dev mailing list and it describes something that is not supposed to happen: a serious new bug in a JDK release candidate phase, just a few w…