~/talk

The Art of Java Language Pattern Matching

Talkat Great International Developer Summit 2025 · 2025-04-22..04-25· [java]
slides:none on file

Project Amber adds concrete language features: Pattern matching for instanceof (JEP 433) and Pattern matching for switch (JEP 441) plus record patterns, unnamed variables and primitives in patterns (JEP 455), with record deconstruction cutting a 14-line point class to one line and JShell revealing a surprising variable-shadowing bug; switch expressions (JDK 12) enforce exhaustiveness with sealed classes, null cases are auto-inserted, guarded patterns use the contextual keyword when (can be confusing), and Platform Prime claims 43% more transactions per second by swapping the JVM.

AI-written summary · about

  1. 0:00Introduction to Java pattern matching
  2. 2:31Switch expressions in Java
  3. 7:04Java records and algebraic data types
  4. 10:36Sealed classes and inheritance
  5. 12:20Pattern matching with instanceof
  6. 21:11Pattern matching in switch statements
  7. 27:57Guarded patterns and dominance
  8. 35:30Pattern matching with records
  9. 41:16Unnamed pattern variables
  10. 44:10Primitive types in pattern matching
  11. 46:40Autoboxing and type matching edge cases
  12. 52:51Summary and future of pattern matching
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.