~/talk

Improve your Java Applications with Records and Pattern Matching

Talkat JNation 2022 · on Tuesday, 2022-06-07· [java]
slides:none on file

Shows concrete refactors on JDK 17: turning Map<String,Integer> entries into State and Population records, adding a small collector and Comparable so grouping and summing works and tests run unchanged. Demonstrates pattern matching for instanceof and switch, uses sealed types to restore exhaustiveness, and previews record pattern matching in JDK 19 plus future array/map deconstruction. Claims performance cost is negligible (hundreds of nanoseconds vs milliseconds for I/O). Emphasizes applied code examples and live refactoring that compile and run.

AI-written summary · about

  1. 0:00Start
  2. 21:59Amber: Record Pattern Matching (prev 19)
  3. 23:08Switch and Record Pattern Matching
  4. 23:34Array Pattern Matching
  5. 24:05Nesting Patterns + Type Inference
  6. 24:55Amber: the Future of Pattern Matching
  7. 25:42Deconstruction Using Factory Methods
  8. 29:57Patterns at a Glance
~/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.