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.
- 1. Demers A., and Donahue J. Datatypes, parameters and type checking 7th ACM Symp on Principles of Programming Languages pp. 12-23, 1980. Google ScholarDigital Library
- 2. Milner A.J.R. A theory of type polymorphism in programming JCSS vol. 17 pp. 348-375, 1978.Google Scholar
- 3. Reynolds J. Types, abstractions and parametric polymorphism Inf. Proc. Lett. vol. 15, 1983.Google Scholar
- 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 ScholarDigital Library
- 5. Tennent R. Principles of Programming Languages Prentice-Hall International, 1980. Google ScholarDigital Library
- 6. Strachey C. Fundamental concepts of programming languages Programming Research Group Oxford University, 1967.Google Scholar
- 7. Matthews D.C.J. The Poly report Cambridge University, 1983.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 10. Harland D.M. Subtypes versus cell constancy with subrange constraints ACM SIGPLAN vol. 17 (no. 12) pp. 65-69, 1982. Google ScholarDigital Library
Recommendations
On understanding types, data abstraction, and polymorphism
Our objective is to understand the notion of type in programming languages, present a model of typed, polymorphic programming languages that reflects recent research in type theory, and examine the relevance of recent research to the design of practical ...
Comments