Project Amber: Recent Java Language Features
summary
Project Amber delivers concrete language changes: var in Java 10 removes repetitive type declarations and reduces boilerplate; switch expressions in Java 14 use -> labels, return values, and compiler-enforced exhaustiveness; text blocks use triple quotes with NL as the canonical newline and strip incidental indentation; records generate final fields plus equals, hashCode and toString and are shallowly immutable; sealed types add a permits clause to restrict subclasses; preview features require the --enable-preview flag at compile and run time.
AI-written summary · about
chapters (10)
- 0:00Introduction to Project Amber
- 1:49What is Project Amber
- 8:19Local variable type inference (var)
- 12:14Text blocks for multi-line strings
- 17:40Switch expressions explained
- 25:30Records as data aggregates
- 39:14Sealed types and controlled subclassing
- 44:56Pattern matching with instance of
- 49:57Future of pattern matching
- 53:51Resources and Q&A
related talks
41mEvolving Java Project Amber
48mUncovering Project Amber: Changes to the Java Language in v10 & Beyond
43mHow Amber is Driving Java’s Evolution
01h 02mJava Project Amber - Not Just a Rare Fossil
43mJava Language Futures, Spring 2023 Edition
46mWhere is the Java language going?
47mThe SolutionFactory to Java's Problems
26mJava Language Futures
