Pattern Matching for Java
cr.openjdk.java.net
Pattern Matching for Java
1–10 of 152 posts
Re: Pattern Matching for Java
#2Re: Pattern Matching for Java
#3Really great proposal. Is this conversation in relation to Java 10 or just pie in the sky?
I hope it does go forward, though. Really useful feature, and given the constraints of the existing language, the proposed syntax looks pretty liveable-with.
Re: Pattern Matching for Java
#4Re: Pattern Matching for Java
#5Re: Pattern Matching for Java
#6Re: Pattern Matching for Java
#7Please use a Scala unapply() and not just constructor parameters. The former gives much more latitude to build patterns.
I have a ton more to say about all of this having written in Scala and Kotlin extensively. I'll just say that it is useful they are already thinking about new variable assignment to parts of matches and NOT concerning themselves w/ "smart casts".
Re: Pattern Matching for Java
#8Any substantial differences from Scala's implementation? From what I remember of Odersky's book it seems very similar if not identical. (Which is fine - I'm all for Java incorporating the best parts of Scala.)