2 ms·
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 wit
by carey 8y 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 http://openjdk.java.net/jeps/325
[2]: http://openjdk.java.net/jeps/305 http://openjdk.java.net/jeps/305
[3]: http://openjdk.java.net/jeps/309 http://openjdk.java.net/jeps/309
- kod 8y agoIf 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.