Pattern matching is at the core of a number of functional programming languages. This mechanism operates over the function parameters of dynamic types to select a suitable implementation. This dispatch mechanism is more generic than the method lookup used in object-oriented (OO) languages, since the method selection depends on the dynamic type of the receiver, and additionally on the static type information of the parameters.
The goal of OOMatch is to shrink the gap between OO languages and functional ones by introducing pattern matching on Java objects. A deconstructor exposes the internals of an object in order to be matched against some patterns. As mentioned, this brings a significant amount of dynamicity, for which a set of methods that can be applied to an object depends on a particular pattern matched by its internal representation at a given time. It would have been interesting to see how this mechanism would apply in a software production setting.
The pattern matching offered by OOMatch differs from that of MultiJava [1] and Lisp-like [2,3] languages, where tackling the extensibility problem is the primary goal. Those languages allow methods to be written external to their class. The primary goal of OOMatch is to study the combination of functional and OO programming paradigms.
Richard and Lhotak keep the description and presentation informal, while at the same time precise. Those interested in understanding the challenges of adding pattern matching to a mainstream programming language will find this paper worth reading.