Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
OOMatch: pattern matching as dispatch in Java
Richard A., Lhotak O.  Object oriented programming systems and applications companion (Companion to the 22nd ACM SIGPLAN conference on Object Oriented Programming Systems and Applications, Montreal, Quebec, Canada, Oct 21-25, 2007)771-772.2007.Type:Proceedings
Date Reviewed: Sep 2 2008

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.

Reviewer:  Alexandre Bergel Review #: CR136014 (0911-1052)
1) Clifton, C.; Millstein, T.; Leavens, G.T.; Chambers, C. MultiJava: design rationale, compiler implementation, and applications. ACM Transactions on Programming Languages and Systems (TOPLAS) 28, 3(2006), 517–575.
2) Steele, Jr., G.L. COMMON LISP: the language (2nd ed.). Digital Press, Bedford, MA, 1990.
3) Paepcke, A. Object-oriented programming: the CLOS perspective. MIT Press, Cambridge, MA, 1993.
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
Classes And Objects (D.3.3 ... )
 
 
Procedures, Functions, And Subroutines (D.3.3 ... )
 
Would you recommend this review?
yes
no
Other reviews under "Classes And Objects": Date
AFC developer’s workshop
Young M., Microsoft Press, Redmond, WA, 1998. Type: Book (9781572316973)
Nov 1 1998
Intermediate MFC
Broquard V., Prentice Hall PTR, Upper Saddle River, NJ, 1998. Type: Book (9780138482763)
Sep 1 1998
Objects, components, and frameworks with UML
D’Souza D., Wills A., Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 1999. Type: Book (9780201310122)
Mar 1 1999
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy