skip to main content
10.1145/41625.41653acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article
Free access

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

Published: 01 October 1987 Publication History

Abstract

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.

References

[1]
L. Augustsson. A compiler for lazy ML. In Proceedings of the 198~ A CM 5~ntpodum on Lisp and Functional Programminf, pages 218-227, Austin, 1984.
[2]
L. Auguetesoa. Compiling ptttern matching. {n Proceedincs of the Conference on Functiono.l Progmntming L~nfuafes,~nd Computer Archite~iere, Springer-Ver|ag, September 1985.
[3]
R.M. BuretaIl and J. Dsrlington. A transformation system for developing recurelve programs. Journal of the A CM, 24( 1):44-67, January 1977.
[4]
R.S. Bird. An introduction to the theory of lists. In Marktoberdory Workshop on Logics of ProgrammingI August 1985.
[5]
R. Buretall, D. MacQueen, and D. Sanella. Hope: An ezpe~/mental applicatiee lancua~c. Technical Report Report CSR-62-80, Edinburgh University, Computer Science Dept., 1980.
[6]
R.M. Bur~taU. Proving properties of programs by structural induction. The Comp~tter Journal, 12(1), February 1969.
[7]
K. FutMagi, J. A. Goguen, J.-P. Jouannaud, and J. Megeguer. Principles of OBJ2. In A CM Symposium on PrincipleJ of Progmmntinf L~nfltafeg, pages 52-66, January 1985.
[8]
J. Fsirbairn and S. (2. Wray. Code gener&tion techniques for functional languages. In Proceedings of,he I986 A CM Symposium on Lisp and Ptmctional Programming, pages 94- 104, Boston, 1986.
[9]
P. Hudsk and D. Krans. A ~omblnator-baeed compiler for a functional language. In A CM $~/mpo~iam on Principles of Programnting Langttages, pages 121-132, January 1984.
[10]
T. Johnsson. Lambda lifting: transforming programs to recursive equations. In Proceedinfs 1985 Conference on Functional Programmin~ L~ncuage~ and Computer Architecture, Nancy, Prance, 1985.
[11]
L. Meertene. Algorithmlcs: Towards programming as a mathematical activity. In J. W. de Bskker, et. al., editors, Mathematics and Competer Science, North-Holland, 1984.
[12]
S.L. Peyton-Jonee. Implementing Functional Languafes udng Graph Redttction. Prentice-Hall, 1987.
[13]
M.R. Sleep and S. HolmetrBm. A short note concerning lazy reduction rules of append. Sofltvare Practice and Ezpcr/ence, 12(11):1082--4, November 1982.
[14]
S. Thompson. Laws in miranda. In ACM Symposium on Lisp and Functional Programming, pages 1-12, August 1986.
[15]
D.A. Turner. Recuraion equatio~ as a programming language. In J. Darlington, P. Henderson, and D. Turner, editors, Fur, ction~l Procmmming and lt~ Applications, Cambridge University Press, 1981.
[16]
D.A. Turner. Miranda: A non-strict functional language with polymorphic types. In Proceeding8 of t~e Conference on Ftmctional Profmmmin~ I.~nguage~ and Computer Ar- ~ltitectttre, Springer-Verlag, September 1985.
[17]
P.L. Wadler. Compiling pattera matching; Lkt comprehenalone. In {Peyg?}.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '87: Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
October 1987
326 pages
ISBN:0897912152
DOI:10.1145/41625
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 October 1987

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

POPL87
Sponsor:

Acceptance Rates

POPL '87 Paper Acceptance Rate 29 of 108 submissions, 27%;
Overall Acceptance Rate 824 of 4,130 submissions, 20%

Upcoming Conference

POPL '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)102
  • Downloads (Last 6 weeks)20
Reflects downloads up to 12 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media