Java Language Futures - All Aboard Project Amber
summary
Local-variable type inference ships as var in JDK 10 and is limited to locals (not fields or API signatures); the compiler normalizes capture types and forbids inferring the pure null type. Work-in-progress features include data classes (boilerplate generated via a semantic declaration), deconstruction patterns plus pattern-matching that generalizes switch into expressions, and sealed types to enable exhaustiveness checks. Prototypes and prototype repos available in OpenJDK and IntelliJ plugins let developers try them; serialization rework follows from the data-class model.
AI-written summary · about
chapters (13)
- 0:00Intro
- 1:00Java Evolution
- 4:29Java Principles, circa 2005
- 8:02Project Amber
- 8:27Expanded Type Inference
- 19:32Boilerplate
- 22:43Encapsulation
- 24:57Data Classes
- 27:56Algebraic Data Types
- 28:36Sealed Classes
- 29:29Improved Switch
- 35:36Pattern Matching
- 45:00Improved Serialization
related talks
41mEvolving Java Project Amber
01h 02mJava Project Amber - Not Just a Rare Fossil
43mJava Language Futures, Spring 2023 Edition
01h 03mProject Amber: Recent Java Language Features
16mThe past, present and future of the Java type system
26mJava Language Futures
42mJava, Today and Tomorrow
43mHow Amber is Driving Java’s Evolution
