Design by Contract in Elixir: "Let it crash" meets "It shouldn't crash"

Guillermo Iguaran
Elixir Developer

Mission-critical systems cannot afford software crashes due to un-handled runtime errors. In 1996, a $500 million software error caused the crash in the maiden flight of the European Ariane 5 launcher. Media reports indicated that a half-billion dollars was lost. Typically unit tests are used to verify that the software works correctly under certain example cases but hardly can be used to detect all possible edge cases during development. In contrast, Design by contract (DbC) is a software correctness methodology that document and programmatically assert the change in state caused by a piece of a program. Contracts, as in daily life, are a set of specifications that cover mutual obligations, benefits and consistency constrains that a software system has to meet. In this talk we will present Design by contract as an alternative approach to ensure correctness of programs in Elixir and give an overview and examples of the properties that can be verified using DbC with the elixir-contracts library (currently under development, will be show for the first time in this event).

Talk objectives:

This talks aim to teach to developers what Design by Contract, what can be achieved using it and how it can be used in any kind of projects, from personal to mission-critical software.

Target audience:

Every developer interested in making his/her code more reliable and higher quality software.


Polyglot software engineer particularly interested in Scheme, Clojure, Haskell, Erlang, Ruby and Elixir. Member of Rails Core team, Rails API team, contributes to Elixir-based projects and is currently researching about optional/gradual type systems for Elixir as part of his Master thesis. Works as Software Engineer at

GitHub: guilleiguaran

Twitter: @guilleiguaran

Back to conference page