Techniques for Metaprogramming in Erlang

Sean Cribbs
Neotoma Creator and Riak Hacker

Much ado has been made about metaprogramming in Elixir and LFE, but what can you do in plain old Erlang? Well, metaprogramming is just a fancy way to generate code, so we can generate Erlang code! In this talk, I'll walk through various techniques for writing programs that generate Erlang, including examples from well-known Erlang tools and libraries such as Lager, Erlydtl, and Neotoma.

Talk objectives:

Explain practical techniques for generating Erlang code, including macros, parse transforms, rewriting abstract code, templating, and generating syntax trees. Show that generating Erlang code is a straightforward and powerful technique for solving many problems.

Target audience:

Developers and language nerds who want to take their Erlang experience to the next level via code generation


Sean Cribbs is Senior Principal Engineer at Comcast/NBC Universal, developing infrastructure software that powers the largest cable Internet and media provider in the USA. Previously, he was Technical Lead at Basho Technologies, where he contributed to almost every part of Riak. An Erlanger since 2008, Sean created the Neotoma PEG/packrat-parser library in 2009, which tackles recognition tasks for many popular Erlang projects.

GitHub: seancribbs

Twitter: @seancribbs

Back to conference page