Hacker News new | ask | show | jobs
by carey 2819 days ago
The first step towards pattern matching will be previewed in JDK 12[1], as a Kotlin-like switch statement, to form the basis of pattern matching[2] together with changes already in JDK 11[3]. I think it will be more like 15 months than 15 years.

I don’t expect higher kinded types any time soon, though.

[1]: http://openjdk.java.net/jeps/325 [2]: http://openjdk.java.net/jeps/305 [3]: http://openjdk.java.net/jeps/309

1 comments

If it doesn't have what 305 calls "deconstruction patterns" and "nested patterns", it's not really pattern matching. I'll be impressed if those make it in within 15 months.