Department of Computer Science and Technology

Technical reports

Programming language design with polymorphism

David Charles James Matthews

143 pages

This technical report is based on a dissertation submitted 1983 by the author for the degree of Doctor of Philosophy to the University of Cambridge, Wolfson College.

DOI: 10.48456/tr-49

Abstract

This dissertation describes the design and implementation of a programming language, Poly. By treating types as values, procedures can be written which can be applied to objects of many different types (polymorphism).

Poly was not designed specifically to investigate polymorphism, rather it was designed to provide a simple yet powerful alternative to large languages like Ada. The type system came out of a desire to treat several different programming language concepts by means of a single parameterisation mechanism, that of procedure application. For example, generic types are considered simply as procedures. Polymorphism as Poly can also be used to provide the effect of overloading without building resolution rules into the language. Unlike the language Russell, Poly does not require that procedures be “variable free”. However, it is still possible to statically type-check a Poly program.

After an introduction to the principles behind modern languages, in particular types and their relation to abstraction, there is a survey of several languages. Adu, CLU, Russell, ML and the Cedar Mesa Kernel illustrate different aspects of language design. Poly is described by means of some examples and then the background to the design is discussed. The rationale behind the type system of Poly is considered and comparisons are made with two other polymorphic languages, ML and Russell. The remainder of the language is developed and some applications are discussed. There is a description of some problems encountered while implementing poly.

Full text

PDF (6.6 MB)

BibTeX record

@TechReport{UCAM-CL-TR-49,
  author =	 {Matthews, David Charles James},
  title = 	 {{Programming language design with polymorphism}},
  url = 	 {https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-49.pdf},
  institution =  {University of Cambridge, Computer Laboratory},
  doi = 	 {10.48456/tr-49},
  number = 	 {UCAM-CL-TR-49}
}