Pattern Matching in the Java Object Model


This document describes a possible approach for how pattern matching might be integrated more deeply into the language. This is an exploratory document only and does not constitute a plan for any specific feature in any specific version of the Java Language. The related documents offered numerous examples of how pattern matching makes common code constructs simpler and less error-prone. These may be enough reason on their own to want to add pattern matching to Java, but we believe there is also a deeper reason to go there: that it fills in a hole in the object model, and one we might not have even realized we were missing…

More at https://github.com/openjdk/amber-docs/blob/master/site/design-notes/patterns/pattern-match-object-model.md