Views: a way for pattern matching to cohabit with data abstraction

  title={Views: a way for pattern matching to cohabit with data abstraction},
  author={P. Wadler},
  booktitle={POPL '87},
  • P. Wadler
  • Published in POPL '87 1987
  • Computer Science
Pattern matching and data abstraction are important concepts in designing programs, but they do not fit well together. Pattern matching depends on making public a free data type representation, while data abstraction depends on hiding the representation. This paper proposes the views mechanism as a means of reconciling this conflict. A view allows any type to be viewed as a free data type, thus combining the clarity of pattern matching with the efficiency of data abstraction. 
Matchete: Paths through the Pattern Matching Jungle
Open pattern matching for C
Pattern Matching with Abstract Data Types
First Class Patterns
Reconciling exhaustive pattern matching with objects
Pattern synonyms