logoalt Hacker News

tancop • today at 6:01 PM • 2 replies • view on HN

Kotlin had it since 1.0, it's just called `when` instead of `match`.

https://kotlinlang.org/docs/control-flow.html#expressions


Replies

wiseowise • today at 7:47 PM

That’s just fancy switch statement.

za3faran • today at 7:09 PM

Kotlin does not have inline destructuring in pattern matching.

➕ show 1 reply