Views: a way for pattern matching to cohabit with data abstraction
POPL '87 Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
A new look at pattern matching in abstract data types
Proceedings of the first ACM SIGPLAN international conference on Functional programming
Statically checkable pattern abstractions
ICFP '97 Proceedings of the second ACM SIGPLAN international conference on Functional programming
Multi-stage programming with explicit annotations
PEPM '97 Proceedings of the 1997 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Pizza into Java: translating theory into practice
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Regular expression pattern matching for XML
POPL '01 Proceedings of the 28th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Proceedings of the sixth ACM SIGPLAN international conference on Functional programming
Guarded recursive datatype constructors
POPL '03 Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
When Do Match-compilation Heuristics Matter?
When Do Match-compilation Heuristics Matter?
CDuce: an XML-centric general-purpose language
ICFP '03 Proceedings of the eighth ACM SIGPLAN international conference on Functional programming
Composable memory transactions
Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel programming
A reflective functional language for hardware design and theorem proving
Journal of Functional Programming
Proceedings of the 2006 workshop on ML
Matching objects with patterns
ECOOP'07 Proceedings of the 21st European conference on Object-Oriented Programming
Compiling pattern matching to good decision trees
Proceedings of the 2008 ACM SIGPLAN workshop on ML
MPC '08 Proceedings of the 9th international conference on Mathematics of Program Construction
Translation correctness for first-order object-oriented pattern matching
APLAS'07 Proceedings of the 5th Asian conference on Programming languages and systems
Matchete: paths through the pattern matching jungle
PADL'08 Proceedings of the 10th international conference on Practical aspects of declarative languages
Implementing joins using extensible pattern matching
COORDINATION'08 Proceedings of the 10th international conference on Coordination models and languages
Gradual refinement: blending pattern matching with data abstraction
MPC'10 Proceedings of the 10th international conference on Mathematics of program construction
Rapid prototyping of DSLs with F#
CEFP'09 Proceedings of the Third summer school conference on Central European functional programming school
Joinads: a retargetable control-flow construct for reactive, parallel and concurrent programming
PADL'11 Proceedings of the 13th international conference on Practical aspects of declarative languages
Extending monads with pattern matching
Proceedings of the 4th ACM symposium on Haskell
Pattern matching for object-like structures in the Go programming language
Proceedings of the 6th Workshop on Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems
Pattern matching for the masses using custom notations
Science of Computer Programming
Static type analysis of pattern matching by abstract interpretation
FMOODS'10/FORTE'10 Proceedings of the 12th IFIP WG 6.1 international conference and 30th IFIP WG 6.1 international conference on Formal Techniques for Distributed Systems
Proceedings of the 8th symposium on Dynamic languages
Reconciling exhaustive pattern matching with objects
Proceedings of the 34th ACM SIGPLAN conference on Programming language design and implementation
Proceedings of the 12th international conference on Generative programming: concepts & experiences
Science of Computer Programming
Hi-index | 0.00 |
Pattern matching of algebraic data types (ADTs) is a standard feature in typed functional programming languages, but it is well known that it interacts poorly with abstraction. While several partial solutions to this problem have been proposed, few have been implemented or used. This paper describes an extension to the .NET language F# called active patterns, which supports pattern matching over abstract representations of generic heterogeneous data such as XML and term structures, including where these are represented via object models in other .NET languages. Our design is the first to incorporate both ad hoc pattern matching functions for partial decompositions and "views" for total decompositions, and yet remains a simple and lightweight extension. We give a description of the language extension along with numerous motivating examples. Finally we describe how this feature would interact with other reasonable and related language extensions: existential types quantified at data discrimination tags, GADTs, and monadic generalizations of pattern matching.