Type systems and programming languages - Bruce Type Systems and Programming Languages Kim Bruce Williams College Types and type systems have played a prominent role in the design of new and more robust programming language designs over the last quarter century. The introduction of language support for abstract data types and for generic or polymorphic functions, procedures, and modules, based on parameterized types, has made it easier to design programs which are secure, yet whose components are more likely to be reusable in other programs. Extensions of traditional type systems to second-order constructs has been at the heart of much of this progress. Language support for abstract data types of the sort found in CLU, Modula-2, and Ada consists of a mechanism for encapsulating declarations of types and operations on them, while providing an abstraction barrier for hiding the implementation of these operations. The idea is that there are many implementations which can be packed up with an interface which looks like this.
Parameterized types give rise to polymorphic functions, procedures, and abstract data types.
Forall T. Exists stack. More elaborate constructs involve restricting both universal and existential quantifiers to guarantee that certain operations exist on the parameterized types. For instance a binary search tree ADT should only be instantiated on types which support ordering relations. All of these constructs make it easier to develop, modify, and reuse code. Abstract data types are easily reused in different programs, because both the types and the operations are designed in a single package which can easily be imported where it is needed.