Coroutines: Kotlin Versus
summary
Compares concrete coroutine designs and tradeoffs: Kotlin puts a single suspend keyword in the language but leaves builders like launch/produce/Deferred in a library; channels are modeled after Go and remain partly experimental. Traces Python’s evolution from yield/send/yield from to async/await (3.5), and notes C++’s C++ coroutines TS landed in compilers (clang/MSVC) and leverages LLVM intrinsics so many languages can share an efficient implementation. Claims compiler-generated coroutines often outperform handcrafted state machines and can optimize away multiple resume calls into simple prints.
AI-written summary · about
chapters (12)
- 0:00Introduction to coroutines
- 12:49Tony Hoare and null pointers
- 15:41Conway and coroutines history
- 17:06Cobalt and early coroutines
- 20:19C# async/await syntax
- 22:03Lua coroutines explained
- 23:50Go routines and channels
- 25:55Python coroutines evolution
- 30:07JavaScript promises vs coroutines
- 33:39C++ coroutines TS
- 40:26LLVM coroutines and optimizations
- 43:40Summary of differences
related talks
59mKotlin coroutines: new ways to do asynchronous programming
46mIntroduction to Coroutines
42mKotlin Coroutines: Beyond async/await
43mCoroutines for Java Developers
47mKotlin Coroutines
11mKotlin Coroutines: Design and Implementation
49mKotlin Coroutines
26mCoroutines and Rx: A Battle Towards Asynchronicity
