Book contents
- Frontmatter
- Contents
- Preface
- 1 Predicate Logic
- 2 The Simple Imperative Language
- 3 Program Specifications and Their Proofs
- 4 Arrays
- 5 Failure, Input-Output, and Continuations
- 6 Transition Semantics
- 7 Nondeterminism and Guarded Commands
- 8 Shared-Variable Concurrency
- 9 Communicating Sequential Processes
- 10 The Lambda Calculus
- 11 An Eager Functional Language
- 12 Continuations in a Functional Language
- 13 Iswim-like Languages
- 14 A Normal-Order Language
- 15 The Simple Type System
- 16 Subtypes and Intersection Types
- 17 Polymorphism
- 18 Module Specification
- 19 Algol-like Languages
- Appendix: Mathematical Background
- Bibliography
- Index
15 - The Simple Type System
Published online by Cambridge University Press: 28 January 2010
- Frontmatter
- Contents
- Preface
- 1 Predicate Logic
- 2 The Simple Imperative Language
- 3 Program Specifications and Their Proofs
- 4 Arrays
- 5 Failure, Input-Output, and Continuations
- 6 Transition Semantics
- 7 Nondeterminism and Guarded Commands
- 8 Shared-Variable Concurrency
- 9 Communicating Sequential Processes
- 10 The Lambda Calculus
- 11 An Eager Functional Language
- 12 Continuations in a Functional Language
- 13 Iswim-like Languages
- 14 A Normal-Order Language
- 15 The Simple Type System
- 16 Subtypes and Intersection Types
- 17 Polymorphism
- 18 Module Specification
- 19 Algol-like Languages
- Appendix: Mathematical Background
- Bibliography
- Index
Summary
Rudimentary type systems appeared in even the earliest higher-level programming languages, such as Fortran, Cobol, and Algol 60. Soon it was realized that such systems permitted a wide variety of programming mistakes to be detected during compilation, and provided information that could be used effectively to improve data representations. The consequence, beginning in the late 1960's, was a sequence of languages, such as PL/I, Algol 68, Pascal, and Ada, with extensive and complicated type systems.
Unfortunately, the type systems of these languages had serious deficiencies that limited their acceptance: Many of the languages contained “type leaks” that prevented the compile-time detection of certain type errors, many required so much type information that programs became unworkably verbose, and all imposed constraints that made certain useful programming techniques difficult or impossible.
Meanwhile, however, more theoretically-minded researchers began a systematic study of type systems, particularly for functional languages. Over the last two decades, they have shown that the application of sophisticated mathematical and logical techniques could lead to substantial improvements. Polymorphic systems have been devised that permit a procedure to be applied to a variety of types of parameters without sacrificing compile-time type checking. Type-inference algorithms have been developed that reduce or eliminate the need for explicit type information. (These two developments were central to the design of ML in the late 1970's.)
Other researchers, while exploring the connections between types and constructive logic, discovered that (at least in the setting of functional programming) the distinction between the type of a program and a full-blown logical specification of the program's behavior is one of degree rather than kind.
- Type
- Chapter
- Information
- Theories of Programming Languages , pp. 315 - 348Publisher: Cambridge University PressPrint publication year: 1998