~/talk

Type Safety and clear error objects in Kotlin

Talkat droidcon Berlin 2024 · 2024-07-03..07-05· [kotlin]
slides:none on file

Uses a concrete updateTimer(id, minutes, seconds) example to show why three Ints lose meaning and cause silent bugs; replaces minute/second Ints with a duration class and replaces raw Int IDs with a typed ID value class (or generic ID) so validity checks are unified and inlined. For return values compares nullable, Java Optional, and Either (Arrow) so errors carry reasons and enable railway-style happy/error flows across data, domain and view layers.

AI-written summary · about

  1. 0:00Type safety in Kotlin
  2. 1:56Context in method params
  3. 6:14ID handling with types
  4. 8:50Performance impact of typing
  5. 9:13Data mapping across layers
  6. 12:51Errors in return types
  7. 15:02Arrow Either for errors
  8. 17:09Railway oriented programming
~/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.