News for hackers. Stuff that matters.
Re:“No, we’re telling everyone we are using Java” by linkmotif on Saturday March 09, 2019 @03:13PM (#19348206)
Yeah I really want to move to a language with pattern matching. Hopefully it will finally land in Java
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.
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.
Re:“No, we’re telling everyone we are using Java” by linkmotif on Saturday March 09, 2019 @05:57PM (#19349076)
Oh! Thought it did. Forget Kotlin, then :)!!
Re:“No, we’re telling everyone we are using Java” by sk5t on Saturday March 09, 2019 @06:04PM (#19349114)
Kotlin is still a pleasant language to use, and some of the ideas have some good carryover to Scala, with quite a lot less culture shock than going right from Java to Scala.
Re:“No, we’re telling everyone we are using Java” by dionian on Saturday March 09, 2019 @06:01PM (#19349100)
scala, eta
Re:“No, we’re telling everyone we are using Java” by Floegipoky on Saturday March 09, 2019 @11:35PM (#19350285)