Data Oriented Programming with the JDK 19
summary
JDK 19/20 introduce records that auto-generate final fields, accessors, equals/hashCode/toString and support canonical and compact constructors for validation; record deserialization invokes the canonical constructor, closing a serialization-validation bypass. Pattern matching (preview) lets code deconstruct records in instanceof, switch and for-each to remove casts, make switches exhaustive when combined with sealed types, and bind nested components directly. Many features (record patterns, nested patterns, for-each patterns) are preview in JDK 19–20; instanceof pattern is final since JDK 16 and other pattern kinds (arrays, deconstructors) are planned.
AI-written summary · about
chapters (7)
- 0:00Introduction to Java
- 3:06Data-oriented Programming
- 6:10Understanding Java Records
- 14:55Records and Serialization
- 23:53Introduction to Pattern Matching
- 34:05Pattern Matching in Switch
- 44:37Future Java Pattern Matching
related talks
36mJava Language Futures - Mid 2020 Edition
01h 11mModern Java: This is not your father's Java anymore
31mData Oriented Programming and Matching in Java
46mJava Records for the Intrigued
33mImprove your Java Applications with Records and Pattern Matching
52mJava Language Futures
37mRecord Patterns - Going Beyond Records - A Deep Dive
46mThe Art of Java Type Patterns
