Episode Synopsis "What are types for? "
Types in programming languages are commonly thought of as a way of preventing certain bad things from happening, such as multiplying a number by a string. But this is only half of the benefit of types: it is what types are against. Types in programming languages are also what enable some good things to happen, such as selecting the right implementation of a heterogeneous operation like comparison or printing based on type information; this is what are types for. This ability is surprisingly powerful, and gives rise to a variety of highly expressive generic programming techniques. Jeremy illustrates with some examples based on the rank-polymorphic array operations introduced in Iverson’s APL: not only does the type information prevent array shape errors, it is what directs the lifting of operations across array dimensions.
Listen "What are types for? "
More episodes of the podcast Strachey 100: an Oxford Computing Pioneer
- Strachey: the Bloomsbury Years
- Strachey and the Oxford Programming Research Group
- Strachey and the development of CPL
- SIS, a semantics implementation system
- Semantic relationships: reducing the separation between practice and theory
- Strachey: school master, language designer, colleague
- Greetings to the participants at “Strachey 100”
- A modelling language approach to defining mathematical structures via semantics
- Christopher Strachey, First-Class Citizen
- Probabilistic Programming
- Parametric Polymorphism and models of storage
- What are types for?