~/talk

The Art of Java Type Patterns

Talkat Devoxx France 2022 · 2022-04-20..04-22· [java]
slides:none on file

Covers concrete language changes and gotchas: introduces JEP 305 pattern matching for instanceof (JDK 14/16) and JEP 406 pattern matching for switch (JDK 17), demonstrates record deconstruction and sealed classes (JDK 15) to make pattern switches exhaustive, and shows the compiler auto-inserting a case null that throws NPE unless explicitly handled. Explains flow scoping, dominance/order of cases, var-in-pattern proposals, that array patterns (JEP 405) were withdrawn, and a jshell binding-name bug versus javac.

AI-written summary · about

  1. 0:00Intro
  2. 0:34Modern Java
  3. 2:45Pattern Matching In Java
  4. 3:23Pattern Matching Fundamentals
  5. 4:47Pattern Types
  6. 6:39Switch Expressions
  7. 7:57Switch Statement
  8. 8:55Switch Expression (JDK 12)
  9. 10:42Simple Java Data Class
  10. 11:27Records (JDK 14)
  11. 12:25Records Additional Details
  12. 13:34Java Inheritance
  13. 14:15Sealed Classes (JEP 360)
  14. 16:47Using The instanceof Operator
  15. 18:22Pattern Matching For instanceof (JDK 14)
  16. 21:34Flow Scoping For Binding Variables
  17. 24:09Pattern Matching For instanceof Puzzler
  18. 29:39Pattern Matching for switch (Completeness)
  19. 31:41Guarded Patterns
  20. 32:47Pattern Dominance
  21. 34:21Pattern Matching instanceof And Records
  22. 35:03Pattern Matching For Records (JEP 405)
  23. 36:11Patterns Are Composable
  24. 38:24Patterns And Local Variable Type Inference
  25. 39:11Using The Any Pattern Match
  26. 40:51Pattern Matching For Arrays
  27. 42:43Azul Zulu Builds of OpenJDK
  28. 44:34DEVOX
~/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.