O'Reilly logo

The Little Elixir & OTP Guidebook by Benjamin Tan Wei Hao

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Dialyzer and type specifications

This chapter covers

  • What Dialyzer is and how it works
  • Finding discrepancies in your code with Dialyzer
  • Writing type specifications and defining your own types

Depending on your inclination, the mere mention of types may make you either shriek with joy or recoil in terror. Being a dynamically typed language, Elixir spares you from having to pepper your code base with types à la Haskell. Some may argue that this leads to a quicker development cycle. But Elixir programmers shouldn’t be too smug. Statically typed languages can catch an entire class of errors at compile time that a dynamic language can only catch at runtime.

Fortunately, the fault-tolerance features baked into the language try to save ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required