The Road to Kotlintown
summary
Shows how Kotlin's type system and generics actually behave: nullability rules, nothing as non-returning, Unit used as a generic result, and why platform types and type erasure bite you. Explains variance with concrete examples (in/out and where clauses), how marking members private hides variance errors, and how lambdas with receivers plus extension functions enable execute‑around patterns and compact DSLs (example: a heist builder and a ConstraintLayout DSL) that reduce ceremony and work reliably.
AI-written summary · about
chapters (34)
- 0:00Introduction
- 1:00Type System
- 2:06Type vs Class
- 2:56No Ability
- 3:36ToDo
- 5:06Any
- 6:50Unit
- 9:15Generics
- 10:21More than one constraint
- 10:43Type erasure
- 11:33Unsafe casts
- 14:02Variance
- 14:38What is Variance
- 14:50Covariance
- 16:35Why do we care
- 17:17Invariants
- 19:47Site Variance
- 20:11Invariant
- 21:33Kotlintown
- 21:52lambdas with receivers
- 22:50example
- 25:40extension functions
- 26:35null or empty
- 29:29Extensions
- 30:05Receivers Extension Methods
- 30:30Design Patterns
- 32:15Executors
- 32:55Heist Example
- 34:07Escape Executors
- 35:09Before and After
- 35:49Domainspecific languages
- 36:36Gradle
- 37:14Heist
- 40:15Questions








