Dissecting the stdlib
summary
Examines stdlib source to show concrete idioms: collections extensions use higher‑order functions and lambdas, lambdas compile to classes so capturing outer variables creates extra objects, and inline functions remove those allocations while reified type parameters let generics be checked at runtime. Shows extension functions compile to static utils, contrasts apply/let/run/also by receiver and return type, and demonstrates lambdas-with-receiver enabling execute‑around and builder patterns. Uses decompiled bytecode examples and practical Android KTX patterns to prove each effect.
AI-written summary · about
chapters (11)
- 0:00Introduction to Kotlin stdlib
- 1:32Collections API in Kotlin
- 4:47Higher-order functions
- 10:09Function types and references
- 16:03Standard extensions overview
- 20:34Extension methods explained
- 24:27Lambdas with receivers
- 29:40Closures and captures
- 33:31Inlining functions
- 38:25Reified generics and infix
- 40:12Conventions and delegates








