Skip to content
0:00 / 0:00

#kotlin#guards#patternmatching

Guards in Kotlin 2.1

Kotlin by JetBrains

100K subscribers • 61 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Made by the vendor. The company whose product it covers made or sponsored it.

Intermediate. Assumes working knowledge.

12K views1 year ago1 recommendation

Programming languagesKotlinLanguage design and type systems

An introduction to the new guard conditions in Kotlin 2.1 when expressions.

Less than two months until KotlinConf 2025! 💜 Get ready for insightful sessions and great networking opportunities. We still have a few tickets left — can’t wait to see you in Copenhagen! 🎟️ kotl.in/kcnf2025 When expressions have always been powerful, but in Kotlin 2.1 it is becoming even more powerful with guards. Learn more in this video! To enable it: Ensure you are using Kotlin 2.1.0 or later in your project Add -Xwhen-guards as a compiler argument For IDE support: Use the latest 2024.3 version of IntelliJ IDEA with K2 mode enabled (requires restart)

Why it's here

1 person recommends this

u/Vegetable-Practice85in r/Kotlin • Recommends

Guards in Kotlin 2.1