skip to main content
article
Free Access

An alternative view of polymorphism

Authors Info & Claims
Published:01 October 1985Publication History
Skip Abstract Section

Abstract

We shall outline the traditional approaches to polymorphism, in the light of Strachey's original work, and languages in the style of RUSSELL, and review the implications for programming language design of the developing interest amongst theoreticians in this subject.It will be shown that the "parametric type-polymorphism" favoured by the majority of today's designers, is actually a very limited form of polymorphism, and we shall show how a much more general concept of polymorphism can be constructed by placing arbitrary constraints on abstract storage types.We will then investigate ways of employing these "guarded cells", outlining several possible applications.The essence of our proposal is that in any language in which there is an unfettered abstraction mechanism, and a sufficiently rich universe of discourse, including types which are properly manipulable values, many forms of polymorphism can be built as abstractions, and so need not be built directly into the fabric of that language. We interpret this to mean that polymorphism is not a major factor in programming language design, whereas we take the view that achieving maximum expressivity is crucial to a design.We shall conclude by relating our work to that of theoreticians in the field, and showing the implications of our proposal for program verification.

References

  1. 1. Demers A., and Donahue J. Datatypes, parameters and type checking 7th ACM Symp on Principles of Programming Languages pp. 12-23, 1980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2. Milner A.J.R. A theory of type polymorphism in programming JCSS vol. 17 pp. 348-375, 1978.Google ScholarGoogle Scholar
  3. 3. Reynolds J. Types, abstractions and parametric polymorphism Inf. Proc. Lett. vol. 15, 1983.Google ScholarGoogle Scholar
  4. 4. Burstall R., and Lampson B. A kernel language for abstract data types and modules Symp on "Semantics of data types" in Lect. Not. Comp. Sci. vol. 173, pp. 1-50, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5. Tennent R. Principles of Programming Languages Prentice-Hall International, 1980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6. Strachey C. Fundamental concepts of programming languages Programming Research Group Oxford University, 1967.Google ScholarGoogle Scholar
  7. 7. Matthews D.C.J. The Poly report Cambridge University, 1983.Google ScholarGoogle Scholar
  8. 8. De Millo R.A., Lipton R.J., and Perlis A.J Social processes and proofs of theorems and programs CACM vol. 22, pp. 271-280, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9. Gunn H.I.E., and Harland D.M. Degrees of constancy in programming languages Inf. Proc. Lett. vol. 13 pp. 35-38, 1981.Google ScholarGoogle ScholarCross RefCross Ref
  10. 10. Harland D.M. Subtypes versus cell constancy with subrange constraints ACM SIGPLAN vol. 17 (no. 12) pp. 65-69, 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library

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

Full Access

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader