Baltimore Elixir & Erlang Meetup: Preview of "Typespecs and Dialyzer for Great Success"

Elixir is a general-purpose, functional programming language that runs on Erlang's virtual machine. Because it runs on Erlang's VM, the BEAM, it inherits the decades of work that make Erlang such a great language for building scalable, fault-tolerant software. Elixir and Erlang are both dynamically typed programming languages.

There is a long history of debate surrounding the benefits and tradeoffs of dynamically and statically typed programming languages. Static typing has many benefits: types serve as documentation, aid in refactoring/maintaining code, help catch bugs at compile-time instead of at run-time, and assist in domain modeling. Dynamic typing also has benefits; there's arguably less up-front cost to develop a system in a dynamically typed language, it can be faster to prototype in dynamically typed languages, and dynamically typed languages can be more flexible.

While the language itself is dynamically typed, Erlang comes with a tool called Dialyzer. Dialyzer is a tool for static analysis that can check programs that run on the BEAM for discrepancies; this includes checking for type errors using a mechanism called success typing. Dialyzer can infer the types of terms in programs, but there are also additional mechanisms for annotating the types of functions (typespecs) that can help serve as documentation and aid in domain modeling.

At this week's Baltimore Elixir and Erlang meetup, I'll be giving a more in-depth talk about types and leveraging typespecs and Dialyzer to write better, easier to understand code with fewer bugs.

The Baltimore Elixir and Erlang meetup is a group for people that are interested in Elixir, Erlang, OTP, and any other language that runs on the BEAM. We welcome people of all experience levels to meet on the last Wednesday of every month.

comments powered by Disqus