• Home
  • Search
  • Extensible pattern matching via a lightweight language extension
  • Cite Icon64
  • https://doi.org/10.1145/1291151.1291159Copy DOI Icon

Extensible pattern matching via a lightweight language extension

  • Oct 1, 2007
  • Don Syme +2 more
Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

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.

Similar Papers
  • Research Article
  • Citations8

Extensible pattern matching via a lightweight language extension

  • Oct 01, 2007
  • ACM SIGPLAN Notices
  • Don Syme +2
  • Research Article
  • Citations13

Matching Objects Without Language Extension.

  • Jan 01, 2006
  • The Journal of Object Technology
  • Joost Visser
  • Book Chapter
  • Citations6

Compiling Pattern Matching in Join-Patterns

  • Jan 01, 2004
  • Qin Ma +1
  • Book Chapter
  • Citations3

Towards a Language for Defining Reusable Programming Language Components

  • Jan 01, 2022
  • Cas Van Der Rest +1
  • Research Article
  • Citations17

Compiling scala for the Java virtual machine

  • Jan 01, 2005
  • Infoscience (Ecole Polytechnique Fédérale de Lausanne)
  • Michel Schinz
  • Research Article
  • Citations9

Pattern matching without K

  • Aug 19, 2014
  • ACM SIGPLAN Notices
  • Jesper Cockx +2
  • Conference Article
  • Citations1

Trieste: A C++ DSL for Flexible Tree Rewriting

  • Oct 17, 2024
  • Sylvan Clebsch +4
  • Book Chapter
  • Citations11

Compilation of non-linear, second order patterns on S-expressions

  • Aug 20, 1990
  • Christian Queinnec
  • Book Chapter
  • Citations3

Typed object-oriented functional programming with late binding

  • Jan 01, 1996
  • Zhenyu Qian +1
  • Research Article

A Design Level Optimization Approach for Functional Paradigm Software Designs Considering Low Resource Devices Development

  • Jun 23, 2016
  • Indian Journal of Science and Technology
  • Selvakumar Samuel +1
  • Book Chapter
  • Citations77

Typed Contracts for Functional Programming

  • Jan 01, 2006
  • Ralf Hinze +2
  • Book Chapter
  • Citations3

Algebraic Data Types

  • Jan 01, 2009
  • Barry Jay
  • Book Chapter
  • Citations3

Proof by Consistency

  • Jan 01, 1991
  • Leo Bachmair
  • Supplementary Content

Functional Programming with Datalog

  • Jan 01, 2022
  • Repository KITopen (Karlsruhe Institute of Technology)
  • André Pacak +1
  • Book Chapter

Introducing Language-Oriented Programming

  • Jan 01, 2010
  • Don Syme +2
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.