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 1989Publication 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. BEJ88.D. BjOrner, A. Ershov, and N.D. Jones, editors, Partial Evaluation and Mixed Computation, North-Holland, 1988 (to appear).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. CW85.L. Cardelli and P. Wegner, On understanding types, data abstraction, and polymorphism. Computing Surveys 17, 4, December 1985.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Car88.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.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. DM82.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.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. FGJM85.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.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. GR83.A. Goldberg and D. Robsort, Smalltalk- 80: The Language and its Implementation. Addison-Wesley, 1983.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Hin69.R. Hindley, The principal type scheme of an object in combinatory logic. Trans. Am. Math. Soc. 146, pp. 29-60, December 1969.]]Google ScholarGoogle Scholar
  8. HMM86.R. Harper, D. MacQueen, and R. Milner, Standard ML. Report ECS-LFCS-86-2, Edinburgh University, Computer Science Dept., 1986.]]Google ScholarGoogle Scholar
  9. HMT88.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.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Kae88.S. Kaes, Parametric polymorphism. In Proceedings of the 2'nd European Symposium on Programming, Nancy, France, March 1988. LNCS 300, Springer-Verlag, 1988.]]Google ScholarGoogle Scholar
  11. Mil78.R. Milner, A theory of type polymorphism in programming. J. Compul. Syst. Sci. 17, pp. 348-375, 1978.]]Google ScholarGoogle ScholarCross RefCross Ref
  12. Mil84.R. Milner, A proposal for Standard ML. In Proceedings of lhe Symposium on Lisp and Functional Programming, Austin, Texas, August 1984.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Mil87.R. Milner, Ch~nges to the Standard ML core language. Report ECS-LFCS-87-33, Edinburgh University, Computer Science Dept., 1987.]]Google ScholarGoogle Scholar
  14. MP85.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.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Rey85.J.C. Reynolds, Three approaches to type structure. In Mathematical Foundations of Software Development, LNCS 185, Springer-Verlag, 1985.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Str67.C. Strachey, Fundamental concepts in programming languages. Lecture notes for International Summer School in Computer Programming, Copenhagen, August 1967.]]Google ScholarGoogle Scholar
  17. Tur85.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.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Wan87.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.]]Google ScholarGoogle Scholar

Index Terms

  1. How to make ad-hoc polymorphism less ad hoc

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • 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

          Copyright © 1989 ACM

          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]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 3 January 1989

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

          Acceptance Rates

          POPL '89 Paper Acceptance Rate30of191submissions,16%Overall Acceptance Rate824of4,130submissions,20%

          Upcoming Conference

          POPL '25

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader