Java is introducing carrier classes and interfaces, a new feature that extends data-oriented programming beyond records. Carrier classes allow data holders with flexible representations (mutable state, derived fields, hierarchies) to gain record-like benefits: reduced boilerplate, pattern matching destructuring, and

24m read timeFrom inside.java
Post cover image
Table of contents
Beyond record patternsThe power of the state descriptionCarrier classesCarrier interfacesMigration compatibility

Sort: