How Amber is Driving Java’s Evolution
summary
Project Amber delivers concrete language changes: records generate equals/hashCode/toString and make data classes shallowly immutable, switch gains arrow syntax and expression form with yield to eliminate fall‑through and require exhaustiveness, and pattern matching (instanceof and switch) introduces pattern variables and flow scoping to remove nested null checks. Sealed classes let a type list its permitted subclasses. Features appear in JDK 14–17, with pattern matching for switch in preview rounds (JEPs 394, 395, 409 etc.), so expect iterative tweaks driven by community feedback.
AI-written summary · about
chapters (9)
- 0:00Introduction and resources
- 2:17Overview of Project Amber
- 5:10Switch statement updates
- 10:59Pattern matching basics
- 14:51Working with records
- 18:53Sealed classes explained
- 22:31Design themes for Java
- 25:49Future language features
- 34:48Array patterns and Q&A
related talks
41mEvolving Java Project Amber
01h 03mProject Amber: Recent Java Language Features
48mUncovering Project Amber: Changes to the Java Language in v10 & Beyond
43mJava Language Futures, Spring 2023 Edition
46mWhere is the Java language going?
55mThe Art of Java Language Pattern Matching
26mJava Language Futures
47mJava Next - From Amber to Loom, from Panama to Valhalla
