Pattern Matching
summary
Overview of concrete Java changes and roadmap: unnamed patterns and pattern variables are already delivered; the current preview adds primitive patterns in instanceof and switch so primitives and references interoperate in patterns; record patterns and sealed types enable composable deconstruction; the compiler performs an exhaustiveness check (avoiding silent defaults by inserting a synthetic default at runtime); future work proposes explicit deconstructors to mirror constructors so classes can opt into safe deconstruction.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 0:43Speaker background
- 1:48Pattern matching history
- 6:04Exhaustiveness benefits
- 9:44Learning Java tips
- 13:55Switch and instanceof
- 15:40Primitive types future
- 17:50Record patterns
- 20:39Deconstructable APIs
- 21:46Closing remarks
related talks
56mThe Art of Java Language Pattern Matching
50mPattern Matching in Java Deep Dive
52mPattern Matching: Small Enhancement or Major Feature?
39mPattern Matching: Small Enhancement or Major Feature?
29mThe Art of Java Language Pattern Matching
46mThe Art of Java Type Patterns
38mPattern Matching in Java: Better Code, Better APIs
25mBrewing Patterns in Java - An Informal Primer
