~/talk

The Magic of Delegates in Kotlin

Talkat Developer Summit 2020 · 2020-11-21..11-22· [kotlin]
slides:none on file

Kotlin provides first‑class delegation so the compiler generates routing methods at bytecode level, avoiding manual duplication and fixing DRY and OCP violations; concrete demos show class Manager : Worker by javaProgrammer, decoupling via constructor injection, and resolving conflicts by forcing explicit overrides when two delegates share a method. Built‑in delegates include by lazy (deferred web fetch) and observable/vetoable (logging and rejecting unwanted updates). The examples compile and behave as described.

AI-written summary · about

  1. 0:00Introduction to delegates
  2. 2:49Problems with inheritance
  3. 12:19Delegation the hard way
  4. 22:25Kotlin’s built-in delegation
  5. 36:43Built-in delegate examples
  6. 47:58Summary and Q&A
~/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.