Curry On
July 18-19th, 2016

A Type is Worth a Thousand Tests
Manuel Chakravarty
UNSW Australia & Applicative



One of the biggest changes in the transition from Objective-C to Swift is the new type system. This change is at the heart of Swift’s language design, from optionals over value types to constrained generics, and to truly understand the language, a thorough understanding of its type system is indispensable. In this talk, I will explain the advantages of Swift’s strong commitment to a sophisticated type system. I will illustrate the impact on language and program design through a series of examples, drawn from my experience of developing one of the first Swift-based applications published in the Mac App Store. I will discuss why type-driven design benefits from functional programming principles, and also, how it enables us to write less tests without a loss of confidence in our code.


Manuel M T Chakravarty is an Associate Professor at the University of New South Wales. His core research interests are functional programming, novel compiler technology, and high-performance computing. He graduated from the University of Karlsruhe and received a doctoral degree from the Berlin Institute of Technology. His major contributions include work on Haskell’s foreign function interface, the C->Haskell binding generator, the theory and implementation of type families in the Glasgow Haskell Compiler, and the development of multiple systems for data parallel programming of multicore CPUs and GPUs, including Accelerate, Data Parallel Haskell, and Repa. He is the principal author of the interactive development environment Haskell for Mac and he is excited by the opportunities presented by the Swift programming language. Most importantly, he believes in the fruitful combination of theory and practice.