Skip to content
0:00 / 0:00

#kotlin#kotlin2.3#expressionbodies

Return... in Expression Bodies?!

Dave Leeds

16K subscribers • 19 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Dave Leeds
  • Linked in the descriptionKotlin/KEEP

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…

Why it's here

1 person recommends this

What people say. Recommended as a helpful explanation of why Kotlin 2.3 allows explicit returns in expression bodies.

u/TypeProjectionin r/Kotlin • Recommends

return... in functions with expression bodies!