u/TypeProjectionin r/Kotlin • Recommends
return... in functions with expression bodies!
#kotlin#kotlin2.3#expressionbodies
16K subscribers • 19 videos on Hallway
Intermediate. Assumes working knowledge.
3.8K views8 months ago1 recommendation
Programming languagesKotlinLanguage design and type systems
Dave Leeds explains why Kotlin 2.3 stabilized explicit returns in expression bodies and how it fits into Kotlin's long-term strategy.
Kotlin 2.3 stabilized a feature that a lot of Kotlin developers missed - you can now use an explicit `return` in expression bodies. But why is this needed? Surprisingly, it fits in very strategically with Kotlin's long-term game plan. I'll show you how. 📚 Chapters return in Expression Bodies...? Demo and Requirements Concise Code The Long-Term Play Summary 🚀 Newsletter: newsletter.typealias.com/ 💬 Rich Errors Presentation - KotlinConf 2025: youtube.com/watch?v=IUrA3mDSWZQ 📝 Rich Errors KEEP: github.com/Kotlin/KEEP/blob/main/proposals/KEEP-0441-rich-er…What people say. Recommended as a helpful explanation of why Kotlin 2.3 allows explicit returns in expression bodies.
u/TypeProjectionin r/Kotlin • Recommends