~/talk

Dissecting Kotlin: Finding Safety

Talkat DroidKaigi 2026 · 2026-09-01..09-03· [kotlin]
links:none on file
slides:none on file

Kotlin’s recent changes tie exhaustiveness, smart casts and type inference together so the compiler actually uses surrounding checks to avoid dead else branches. A new opt‑in data flow-based exhaustiveness feature lets a when expression be exhaustive after prior if‑guards (example: a 5‑value enum for crew health), removing boilerplate and hidden bugs. The contracts API encodes predicates into the compiler so callers avoid unsafe casts and gain the same positive/negative type info that enables reliable smart casts.

AI-written summary · about

  1. 0:00Kotlin safety intro
  2. 1:15Kotlin’s safety defaults
  3. 4:12Kotlin’s when expression
  4. 12:27Exhaustiveness in when
  5. 20:06Smart casts in Kotlin
  6. 31:09Data-flow exhaustiveness
  7. 36:28Contracts for compiler safety
  8. 40:21Null safety in Kotlin
  9. 41:45Summary: prioritize safety
~/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.