~/talk

Write smarter code with Sealed Classes and Lambdas in Kotlin

Talkat droidcon EMEA 2020 · 2020-10-08..10-09· [kotlin, software-architecture]
slides:none on file

Kotlin example builds a RecyclerView with a sealed StaggeredListItem hierarchy (BuyNow, Auction, Advertisement) attached to data classes so each case carries its own fields and benefits from smart casted properties without explicit casts. A generic BaseViewHolder<T: StaggeredListItem> plus an enum-backed getItemViewType keeps creation simple; lambdas replace bulky callback interfaces so clicks are passed as functions and composed at adapter construction. Compiler enforces exhaustive when branches and benchmarks show negligible lambda overhead.

AI-written summary · about

  1. 0:00Introduction
  2. 1:36About the speaker
  3. 3:20Sealed classes basics
  4. 9:20Lambda expressions overview
  5. 13:55Combining sealed classes and lambdas
  6. 21:43Building a text store demo
  7. 26:03Handling new item types
  8. 29:14Q&A session
~/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.