Academese to English: A Practical Tour of Scala’s Type System

Academese to English: A Practical Tour of Scala’s Type System

Scala is famous in part for having one of the richest type systems of all mainstream programming languages today. Despite its reputation, Scala’s type system remains one of the most under-documented and jargon-heavy aspects of Scala.

This talk will turn the academese into English, providing an example-rich tour of Scala’s type system, covering all the things that make people call it “powerful”. This talk isn’t about showcasing a bunch of challenging little logical puzzles with types; on the contrary, this talk is about showing practical uses of Scala’s type system, making it work for you and your users. We’ll see how we can use it to improve usability by reducing boilerplate, meanwhile keeping code type-safe. We’ll touch on the practical parts of Scala’s type system, all through examples.

Big thanks to:
Julien Richard-Foy, who provided a great co/contravariance example
Rex Kerr and mucaho for a variance vs bounds SO example
Bill Venners, for his explorations with type parameters vs type members
And David R. MacIver for a great running existentials example


Heather Miller

April 11, 2016