~/talk

Sealed Classes, Unsealed Complexity

Talkat droidcon Toronto 2019 · on Wednesday, 2019-11-13· [kotlin, frontend-architecture]
slides:none on file

Demonstrates that Kotlin sealed classes replace fragile enums and ad‑hoc error handling by modeling concrete outcomes: a login API is refactored into LoginSuccess/LoginFailure wrappers, enums fail because they cannot carry state, and sealed classes carry tokens, messages or exceptions and enable exhaustive when checks at compile time. A second example replaces duplicated search/refresh UI code with a sealed SearchViewState so states become mutually exclusive view states, reducing bugs, duplication and feedback cycles.

AI-written summary · about

  1. 0:00Start
  2. 14:11Disadvantages of Enums
  3. 14:35Scaled classes
  4. 18:06Advantages of Sealed classes
  5. 32:24Overview
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.