OOMatch: pattern matching as dispatch in Java

  • Authors:
  • Adam Richard;Ondrej Lhotak

  • Affiliations:
  • University of Waterloo, Waterloo, ON, Canada;University of Waterloo, Waterloo, ON, Canada

  • Venue:
  • Companion to the 22nd ACM SIGPLAN conference on Object-oriented programming systems and applications companion
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present an extension to Java, dubbed OOMatch. It allows method parameters to be specified as patterns, which are matched against the arguments to the method call. When matches occur, the method applies; if multiple methods apply, the method with the more specific pattern overrides the others.