Re:“No, we’re telling everyone we are using Java”
by vbezhenar on Saturday March 09, 2019 @04:46PM
(#19348699)
Kotlin does not support pattern matching.
[ Parent
| on HN ]
Re:“No, we’re telling everyone we are using Java”
by sk5t on Saturday March 09, 2019 @05:36PM
(#19348973)
Yeah, Kotlin has some "enhanced switch" type stuff, but nothing that compares to Scala's matching with unapply, list extraction, etc.
Re:“No, we’re telling everyone we are using Java”
by vbezhenar on Sunday March 10, 2019 @06:19AM
(#19351296)
Actually they have some foundations, componentN functions serve similar role to unapply, so theoretically it should be possible to build good enough pattern matching. But, unfortunately, they seem to slow down language development a lot since release.
Re:“No, we’re telling everyone we are using Java”
by nostrademons on Saturday March 09, 2019 @06:46PM
(#19349294)
It has destructuring in value binding and lambda parameters, as well. Pretty handy when you're dealing with a lot of pairs, triples, and data classes, though not quite as powerful as true pattern-matching.