

Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- Java continues to try and catch up to Kotlin https://kotlinlang.org/docs/sealed-classes.html
I didn't mind Java when the comparisons were to C++, Ruby, and Python. I can not find a reason to go back after Scala (which seemed to fail due to being indiscriminate) and especially Kotlin
by Larrikin - Java also has recursive patterns and (maybe still in preview) literal patterns: `switch (x) { case A(B(true, var c)) -> f(c); }`