Nothing Special   »   [go: up one dir, main page]

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

How to make ad-hoc polymorphism less ad hoc

Published: 03 January 1989 Publication History

Abstract

This paper presents type classes, a new approach to ad-hoc polymorphism. Type classes permit overloading of arithmetic operators such as multiplication, and generalise the “eqtype variables” of Standard ML. Type classes extend the Hindley/Milner polymorphic type system, and provide a new approach to issues that arise in object-oriented programming, bounded type quantification, and abstract data types. This paper provides an informal introduction to type classes, and defines them formally by means of type inference rules.

References

[1]
D. BjOrner, A. Ershov, and N.D. Jones, editors, Partial Evaluation and Mixed Computation, North-Holland, 1988 (to appear).]]
[2]
L. Cardelli and P. Wegner, On understanding types, data abstraction, and polymorphism. Computing Surveys 17, 4, December 1985.]]
[3]
L. Cardelli, Structural subtyping and the notion of power type. In Proceedings of ~he 15'th Annual Symposium on Principles of Programming Languages, San Diego, California, January 1988.]]
[4]
L. Damns and R. Milner, Principal type schemes for functional programs. In Proceedings of the 9'th Annual Symposium on Principles of Programming Languages, Albuquerque, N.M., January 1982.]]
[5]
K. Futasagi, J.A. Goguen, J.-P. Jouannaud, and J. Meseguer, Principles of OBJ2. In Proceedings of the 12'~h Annual Symposium on Principles of Programming Languages, January 1985.]]
[6]
A. Goldberg and D. Robsort, Smalltalk- 80: The Language and its Implementation. Addison-Wesley, 1983.]]
[7]
R. Hindley, The principal type scheme of an object in combinatory logic. Trans. Am. Math. Soc. 146, pp. 29-60, December 1969.]]
[8]
R. Harper, D. MacQueen, and R. Milner, Standard ML. Report ECS-LFCS-86-2, Edinburgh University, Computer Science Dept., 1986.]]
[9]
R. Harper, R. Milner, and M. Tofte, The definition of Standard ML, version 2. Report ECS-LFCS-88-62, Edinburgh University, Computer Science Dept., 1988.]]
[10]
S. Kaes, Parametric polymorphism. In Proceedings of the 2'nd European Symposium on Programming, Nancy, France, March 1988. LNCS 300, Springer-Verlag, 1988.]]
[11]
R. Milner, A theory of type polymorphism in programming. J. Compul. Syst. Sci. 17, pp. 348-375, 1978.]]
[12]
R. Milner, A proposal for Standard ML. In Proceedings of lhe Symposium on Lisp and Functional Programming, Austin, Texas, August 1984.]]
[13]
R. Milner, Ch~nges to the Standard ML core language. Report ECS-LFCS-87-33, Edinburgh University, Computer Science Dept., 1987.]]
[14]
J.C. Mitchell and G. D. Plotkin, Abstract types have existential type. In Proceedings of ~he 12'th Annual Symposium on Principles of Programming Languages, Jartuary 1985.]]
[15]
J.C. Reynolds, Three approaches to type structure. In Mathematical Foundations of Software Development, LNCS 185, Springer-Verlag, 1985.]]
[16]
C. Strachey, Fundamental concepts in programming languages. Lecture notes for International Summer School in Computer Programming, Copenhagen, August 1967.]]
[17]
D.A. Turner, Miranda: A non-strict functional language with polymorphic types. In Proceedings of the #'nd lurernational Conference on Functional Programming Languages and Computer Architecture, Nancy, France, September 1985. LNCS 201, Springer-Verlag, 1985.]]
[18]
M. Wand, Complete type inference for simple objects. In Proceedings of the Symposium on Logic in Computer Science, Ithaca, NY, June 1987. IEEE Computer Society Press, 1987.]]

Cited By

View all
  • (2024)Existential Containers in ScalaProceedings of the 21st ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3679007.3685056(55-64)Online publication date: 13-Sep-2024
  • (2024)Higher-Order unification for free!: Reusing the meta-language unification for the object languageProceedings of the 26th International Symposium on Principles and Practice of Declarative Programming10.1145/3678232.3678233(1-13)Online publication date: 9-Sep-2024
  • (2024)Closure-Free Functional Programming in a Two-Level Type TheoryProceedings of the ACM on Programming Languages10.1145/36746488:ICFP(659-692)Online publication date: 15-Aug-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
POPL '89: Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
January 1989
352 pages
ISBN:0897912942
DOI:10.1145/75277
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: 03 January 1989

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

POPL89

Acceptance Rates

POPL '89 Paper Acceptance Rate 30 of 191 submissions, 16%;
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)947
  • Downloads (Last 6 weeks)110
Reflects downloads up to 01 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Existential Containers in ScalaProceedings of the 21st ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes10.1145/3679007.3685056(55-64)Online publication date: 13-Sep-2024
  • (2024)Higher-Order unification for free!: Reusing the meta-language unification for the object languageProceedings of the 26th International Symposium on Principles and Practice of Declarative Programming10.1145/3678232.3678233(1-13)Online publication date: 9-Sep-2024
  • (2024)Closure-Free Functional Programming in a Two-Level Type TheoryProceedings of the ACM on Programming Languages10.1145/36746488:ICFP(659-692)Online publication date: 15-Aug-2024
  • (2024)Associated Effects: Flexible Abstractions for Effectful ProgrammingProceedings of the ACM on Programming Languages10.1145/36563938:PLDI(394-416)Online publication date: 20-Jun-2024
  • (2024)Total Type Error Localization and Recovery with HolesProceedings of the ACM on Programming Languages10.1145/36329108:POPL(2041-2068)Online publication date: 5-Jan-2024
  • (2024)Forward- or reverse-mode automatic differentiationScience of Computer Programming10.1016/j.scico.2023.103010231:COnline publication date: 1-Jan-2024
  • (2023)Fast and Efficient Boolean Unification for Hindley-Milner-Style Type and Effect SystemsProceedings of the ACM on Programming Languages10.1145/36228167:OOPSLA2(516-543)Online publication date: 16-Oct-2023
  • (2023)Generic Programming with Extensible Data Types: Or, Making Ad Hoc Extensible Data Types Less Ad HocProceedings of the ACM on Programming Languages10.1145/36078437:ICFP(356-384)Online publication date: 31-Aug-2023
  • (2023)Flexible Instruction-Set Semantics via Abstract Monads (Experience Report)Proceedings of the ACM on Programming Languages10.1145/36078337:ICFP(108-124)Online publication date: 31-Aug-2023
  • (2023)Better Defunctionalization through Lambda Set SpecializationProceedings of the ACM on Programming Languages10.1145/35912607:PLDI(977-1000)Online publication date: 6-Jun-2023
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media