Lecture 10: Some Other Programming-Language Approaches to Concurrency

Title slide

Slides : Recording

This lecture set out some alternative approaches for managing concurrency in programming languages: asynchronous message-passing Actors and the cheerfully optimistic concurrency of Software Transactional Memory. These are two examples from a wide range of mechanisms in use across many programming languages and applications domains, all of which seek to balance the key concurrency requirements of separation to prevent inconsistency and co-operation to allow interaction.

Read more

Lecture 8: Concurrency

Title slide

Slides : Recording

Moving on from type systems, today’s lecture started to look at programming for concurrency: why you might want — or need — to write concurrent code and some of the challenges in doing so. I also introduced some of the concurrency primitives in Java and how they are used, as well as telling a story about the Apollo Guidance Computer and the robustness of its concurrent event handling under input overload.

Read more

Lecture 7: Dependent Types

Title slide
Slides : Recording

Today’s lecture completes the quartet of type/term interactions: after first-class functions, parameterized types, and polymorphic terms, we have types that depend on terms themselves. Numerical examples include types to capture vector lengths and matrix dimensions, and thereby specify more precisely the domain and range of operations like matrix inversion or multiplication. Dependent types can also be used to strengthen the deep embedding of domain-specific languages into a host meta-language. Examples of this included typed lambda-terms and logical formulas. The lecture also touched on the Curry-Howard correspondence of propositions-as-types seen earlier in Wadler’s talk, and the use of dependently-typed programming in the machine-assisted proof of mathematical theorems. Finally, there were some references to dependently-typed languages for writing and verifying programs that are correct by construction.

Read more

Lecture 5: Higher Polymorphism

Title slide

Slides : Recording

This lecture continued the exploration of polymorphism from Lecture 3 with more varieties of polymorphism and more expressive applications of the technique. This included: subtypes and the Liskov substitutivity principle; how this interacts with parametric types; covariant, contravariant and invariant types; how subtyping is not inheritance; polymorphic type schemes; Hindley-Milner type inference; rank-2 types and higher; and the history of the Great Computer Language Shootout.

Links: Slides from Lecture 5; Recording of Lecture 5

Read more

Lecture 3: Parameterized Types and Polymorphism

Title slide

Slides : Recording

Monday’s lecture gave examples of parameterized types in different programming languages: families of data types with a common structure, built by applying type constructors to one or more type parameters. Examples include in Java or C# generics as well as the algebraic datatypes of Haskell and OCaml. To work with parameterized types we use polymorphic functions — code that can work with more than one type, either in a uniform way (parametric polymorphism) or with type-specific variations (ad-hoc polymorphism).

Links: Slides for Lecture 3; Recording of Lecture 3

Read more