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

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

reply
That’s just fancy switch statement.
reply
Kotlin does not have inline destructuring in pattern matching.
reply
Pattern matching with only positional destructuring is a bad feature. I've written enough Scala to say this with confidence.
reply
Kotlin has always had smart-casting in if and when (sort of switch) expressions, which are strictly more powerful than the current version of Java "pattern matching". Both don't do de-structuring which I would consider a basic requirement for pattern matching, but at least Kotlin didn't call it pattern matching.
reply
[flagged]
reply