~/talk

Enums on steroids - let's look at sealed classes !

Talkat Voxxed Days Thessaloniki 2024 · 2024-10-18..10-19· [java]
slides:none on file

Shows a concrete loan-evaluator implemented across Java 11→23 that replaces a twelve-line instanceof/switch mess with a sealed-response hierarchy of exactly three outcomes (Approval, Refusal, Suspension), proving sealed interfaces with permits provide enum-like exhaustiveness while allowing per-variant fields and methods. Uses Java features: records, pattern-matching switches, guarded patterns, arrow labels, deconstruction and '_' ignores; demo code compiles, removes casts, and is on the linked repo as a working example of record deconstruction.

AI-written summary · about

  1. 0:00Welcome
  2. 1:11Java still matters
  3. 5:52Loan engine states modeling
  4. 9:30OO modeling with classes
  5. 12:19Code entropy and instanceof
  6. 14:09Java 13 pattern matching
  7. 14:56Java 16 records intro
  8. 18:07Switch pattern matching
  9. 21:40Guarded patterns handling
  10. 24:50Sealed classes explained
  11. 28:44Enums vs sealed classes
  12. 30:10Java 17 records deconstructed
  13. 33:31Java 23 features
  14. 36:04Conclusion
~/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.