Bringing Types to Elixir


I propose a talk on my PhD research on introducing a type system to Elixir. This talk will focus on set-theoretic types, and how they are uniquely suited to represent Elixir programs. I will discuss the potential benefits of a type system designed for Elixir, such as detecting common bugs and providing direct feedback on code quality.

In addition to exploring the use of types to describe and enforce function interfaces, I will provide examples of new syntax for types that could be added to the language. I will delve into the concept of gradual typing, and its ability to mix typed and untyped code, as well as ease the optional transition of existing codebases towards types.

I will share my perspective on the project, the challenges we have faced in collaboration with Giuseppe Castagna and José Valim, and the current state of the work.

Talk objectives:

  • In this talk, we aim to showcase the potential benefits of a type system for Elixir, with practical examples of its use. We believe that a carefully designed type system can bring significant advantages to Elixir with little or no downsides. We would welcome feedback on this perspective, as well as on the changes and features we plan to introduce to the language.

Target audience:

  • Every Elixir programmer.

Introductory and overview

Types, Contracts, Set-Theoretic