The Road to Kotlintown III: Delegate 95 to Coroutine 66
summary
Shows how Kotlin delegation actually reduces boilerplate: implement property delegates (used for SharedPreferences, custom view setters) via Delegates.observable or custom getValue/setValue and the by syntax — the shared‑prefs delegate works and simplifies callers but adds runtime cost and must avoid heavy side effects. Explains suspend and coroutines as continuation‑based state machines (suspend points produce a finite-state machine so one generated class can cover many suspension points), lazy defaults to synchronized, coroutines are sync by default and require async for parallelism.
AI-written summary · about
chapters (32)
- 0:00Introduction
- 1:30Delegation
- 13:23Delegate Code
- 14:53ReadWrite Property
- 16:36Conventions
- 17:38Lazy
- 20:16Lazying
- 30:14Managing Coroutines
- 30:58Coroutine Definition
- 31:11Cooperation
- 31:23Recap
- 31:50Coroutine
- 32:26Language Support
- 33:07Compilation Error
- 33:34Code snippet
- 33:53What is a continuation
- 34:09What does continuation mean
- 34:59Marking suspension explicitly
- 35:27The two bits of knowledge
- 35:54Why do we care
- 36:20Example
- 37:39State Machine
- 38:51Continuation
- 39:22Retrofit
- 40:00Coroutine Context
- 40:21Context Element
- 40:32Why Coroutines
- 41:10Coroutine builders
- 44:30Experimental keyword
- 44:40Experimental TLDR
- 45:17RxCoroutines
- 45:57Outro








