Open pattern matching for C++

  • Authors:
  • Yuriy Solodkyy;Gabriel Dos Reis;Bjarne Stroustrup

  • Affiliations:
  • Texas A&M University, College Station, TX, USA;Texas A&M University, College Station, TX, USA;Texas A&M University, College Station, TX, USA

  • Venue:
  • Proceedings of the 2013 companion publication for conference on Systems, programming, & applications: software for humanity
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Pattern matching is an abstraction mechanism that can greatly simplify source code. We present functional-style pattern matching for C++ implemented as a library, called Mach7. All the patterns are user-definable, can be stored in variables, passed among functions, and allow the use of open class hierarchies. As an example, we implement common patterns used in functional languages.