Abstract
Structural pattern-matching as a language feature has become more common in programming languages over the past decade. This paper will consider more generally the challenge of adding pattern matching as a programming language feature, from the points of view of language design, rigorous static error detection, and effectiveness. In this context, a pattern matching language feature can be seen as providing a more rigorous approach to handling the complex conditionals that arise in processing highly structured input.
- Xavier Leroy, Damien Doligez, Alain Frisch, Jacques Garrigue, Didier Rémy and Jérôme Vouillon (2021), Chapter 9, The OCaml Language, Section 6, Patterns, The OCaml Manual, https://ocaml.org /manual /patterns.html, retrieved 25-Feb-2022.Google Scholar
- Python Software Foundation (2022), 8.6 The Match Statement, The Python Language Reference, https://docs.python.org/3/reference/compound_stmts.html#the-matchstatement, retrieved 25-Feb-2022.Google Scholar
- Simon Marlow (ed.) (2010), 3.17 Pattern Matching, Haskell 2010 Language Report, https: //www.haskell.org /onlinereport /haskell2010 /haskellch3.html, retrieved 25-Feb-2022.Google Scholar
- Luca Maranget (2007). Warnings for pattern matching. Journal of Functional Programming, 17(3), 387--421. doi:10.1017/S0956796807006223, http://moscova.inria.fr/~maranget/papers/warn/index.html, retrieved 7-Jul-22.Google Scholar
Cross Ref
- LFabrice e Fessant and Luca Maranget. (2001). Optimizing Pattern Matching. ACM SIGPLAN Notices. 36. 10.1145/507635.507641.Google Scholar
- Gavin Bearman, JEP 427: Pattern Matching for switch (Third Preview), OpenJDK, https://openjdk.org/jeps/427, retrieved 7-Jul-22.Google Scholar
- Steve Klabnik, Carol Nichols, et al (2022), All the places patterns can be used, The Rust Programming Language, https://doc.rustlang. org/book/ch18-01-all-the-places-for-patterns.html, retrieved 7- Jul-22.Google Scholar
- Michael Brennan (2014), Regular Expressions, The GNU AWK User's Guide, https://www.gnu.org/software/gawk/manual/html_node/Regexp.html, retrieved 7-Jul-22.Google Scholar
- Tucker Taft, Robert Duff, et al (2022), 5.4 Case Statements, Ada Reference Manual, http://www.adaauth. org/standards/2xrm/html/RM-5--4.html, retrieved 8-Jul-22.Google Scholar
- Mikael Pettersson (1992), A Term Pattern-Match Compiler Inspired by Finite Automata Theory. In Workshop on Compiler Construction. Springer-Verlag, 1992. Lecture Notes in Computer Science 641.Google Scholar
Digital Library
- Michael O. Rabin and Dana Scott (1959)., "Finite automata and their decision problems". IBM Journal of Research and Development. 3 (2): 114--125. doi:10.1147/rd.32.0114. ISSN 0018--8646.Google Scholar
Digital Library
- John E. Hopcroft (1971). An n logn algorithm for minimizing the states in a finite automaton. In: Kohavi, Z. (ed.) The Theory of Machines and Computations, pp. 189--196. Academic Press.Google Scholar
Cross Ref
- Manuel Fahndrich and John Boyland (1997). Staticallly Checkable Pattern Abstractions. Proceedings of the International Conference on Functional Programming (ICFP '97) | June 1997. https://www.researchgate.net/publication/236160052_Staticallly_Che ckable_Pattern_Abstractions, retrieved 11-Jul-2022Google Scholar
- Chris Okasaki (1999). "Red--black trees in a functional setting". Journal of Functional Programming. 9 (4): 471--477. doi:10.1017/S0956796899003494. ISSN 1469--7653.Google Scholar
Digital Library
Recommendations
Open pattern matching for C++
GPCE '13Pattern matching is an abstraction mechanism that can greatly simplify source code. We present functional-style pattern matching for C++ implemented as a library, called Mach71. All the patterns are user-definable, can be stored in variables, passed ...
Optimising First-Class Pattern Matching
SLE 2022: Proceedings of the 15th ACM SIGPLAN International Conference on Software Language EngineeringPattern matching is a high-level notation for programs to analyse the shape of data, and can be optimised to efficient low-level instructions. The Stratego language uses first-class pattern matching, a powerful form of pattern matching that ...
Open pattern matching for C++
GPCE '13: Proceedings of the 12th international conference on Generative programming: concepts & experiencesPattern matching is an abstraction mechanism that can greatly simplify source code. We present functional-style pattern matching for C++ implemented as a library, called Mach71. All the patterns are user-definable, can be stored in variables, passed ...






Comments