~/talk

Pattern Matching for Java

Talkat Devnexus 2022 · 2022-04-12..04-14· [java]
links:none on file
slides:none on file

Project Amber features are shown with concrete Java versions and code effects: Java 16 brings the instanceof pattern that removes casts and introduces flow-scoped binding variables; Java 17/preview adds switch expressions with guarded patterns, a null case label, and dominance rules; records and sealed classes (the records and sealed classes combo) enable exhaustive matching so switches can omit defaults. Examples include record deconstruction and array patterns; the talk demos how these reduce boilerplate and catch bugs earlier.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 0:25Project Amber overview
  3. 2:31Records and sealed types
  4. 7:23What is pattern matching
  5. 9:13Why learn pattern matching
  6. 12:04Problem with old instance of
  7. 14:23Instance of with pattern matching
  8. 15:25Binding variables explained
  9. 17:09Switch statements evolution
  10. 18:32Switch expressions benefits
  11. 19:12Handling null in switch
  12. 20:14Guarded patterns
  13. 21:17Pattern label dominance
  14. 22:01Exhaustive switch checks
  15. 23:27Types of pattern matching
  16. 24:09Record patterns demo
  17. 25:46Q&A session
~/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.