~/talk

Sealed Classes Opened My Mind: How We Use Kotlin to Tame State at Etsy

Talkat KotlinConf 2018 · 2018-10-03..10-05· [kotlin]
slides:none on file

Describes using sealed classes plus Kotlin’s when and IDE exhaustiveness checks to model social sign‑in state at Etsy, splitting the flow into three sealed data classes that represent the three API responses (social, sign‑in, 2FA) rather than one huge tree. Shows using filterIsInstance (and RxJava mapping) to get filtered views so when only handles wool‑level cases, compares this to visitor/instanceof patterns, and explains why this reduces bugs and boilerplate.

AI-written summary · about

  1. 0:00Intro
  2. 0:47Managing State
  3. 2:01What are Sealed Classes
  4. 3:29Example
  5. 8:45New Example
  6. 14:31Social Signin
  7. 16:21Model
  8. 18:25Duplication
  9. 23:59Why Kotlin
  10. 25:57Kotlin Visitor Pattern
  11. 27:46Kotlin Delegate Adapter Pattern
  12. 29:57Kotlin Switch Statement
  13. 31:38What are we trying to solve
~/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.