Y
Hacker News
new
|
ask
|
show
|
jobs
by
simonkagedal
1013 days ago
What kinds of pattern matching that Java now has is Kotlin missing?
1 comments
richbell
1013 days ago
At the moment Kotlin only has smart casts and exhaustive type checking (e.g., making sure you didn't forget a switch case). It doesn't let you destructure records, add guards to cases, etc.
https://www.infoq.com/articles/pattern-matching-for-switch/
link
https://www.infoq.com/articles/pattern-matching-for-switch/