Dissecting the stdlib
summary
Walks through stdlib source and decompiled bytecode to show exactly how features work: lambdas compile into inner classes and use a single instance until they capture variables, captured variables force new allocations, inline functions copy lambda bodies to call sites eliminating those allocations and enabling non‑local returns and reified generics. Covers extension functions, lambdas with receiver for "execute‑around" patterns, infix and operator conventions, and experimental contracts that let the compiler perform smart casts based on function behavior.
AI-written summary · about
chapters (31)
- 0:00Start
- 1:43The Collections Api
- 2:07Collections Api Is a Functional Api
- 2:28Functional Style Functional Programming
- 5:39Filter
- 6:01Higher-Order Functions
- 6:41Function Literals
- 7:27Lambdas
- 9:34Non-Local Return
- 12:28Functions as Parameters
- 12:50Event Tracking
- 15:08Anonymous Functions
- 15:40Anonymous Function
- 16:40Standard Extensions
- 18:17Source of the Standard Extensions
- 19:40Extension Functions
- 27:39Design Patterns
- 27:49Execute around Method
- 29:43Closures and Captures
- 29:59What Are Closures and Captures
- 31:08Efficient Lambdas
- 31:48Trade-Offs with Lambdas
- 33:36Penalties of Lambda through Inlining
- 33:52Inline Higher-Order Functions
- 35:14Bytecode
- 36:17Inline Function
- 37:52No Inline Keyword
- 39:30Reification
- 42:15Conventions
- 42:55Operator Overloading
- 43:47Contracts








