3 ms·
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 recor
by richbell 3y 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/ https://www.infoq.com/articles/pattern-matching-for-switch/