Brussels / 3 & 4 February 2024


Gleam in the machine: phantom types and the builder pattern.

Discussions about types often begin and end with the assertion that they make our programs safer, but how to get the most out of types can be a bit of a mystery. With the development of a type system for Elixir, multiple explorations for Erlang, and the steady growth of Gleam there is increasing demand for practical discussions on how types can be used to write better programs.

This talk explores one such technique, known as "phantom types". We will learn what phantom types are, why they can be useful, and see some examples of Gleam packages employing them in the wild to achieve safer APIs.


Photo of Hayleigh Thompson Hayleigh Thompson