~/talk

Algebraic Data Types

Talkat Devnexus 2021 · 2021-02-17..02-18· [java, compilers-and-language-design]
slides:none on file

Code and examples on GitHub demonstrate Java's algebraic data types: enums, Optionals, generics-based tuples, preview records (Java 14/15) and sealed types (Java 15), plus pattern matching via instanceof and Class.isAssignableFrom. Compact record constructors validate and throw NullPointerException or custom exceptions; local records show scoped declarations; sealed classes use permits to block an octagon example and allow only declared subclasses; tuples implemented as Pair/Twin work with generics; all examples compile and run, printing the expected outputs.

AI-written summary · about

  1. 0:00Introduction to ADTs
  2. 2:28Java enums explained
  3. 8:05Optional types in Java
  4. 13:39Sealed classes overview
  5. 19:17Product types in Java
  6. 23:31Java records deep dive
  7. 29:46Pattern matching recap
  8. 30:07Summary and closing
~/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.