Skip to content

What are anti-patterns? ​

Source: Elixir guide, What are anti-patterns?.

Anti-patterns are common mistakes, or indicators of problems in code. People also call them "code smells". These guides document the anti-patterns that people found in Elixir software, so that you can see them and know their risks.

If code matches an anti-pattern, it does not mean that you must change the code. Sometimes the anti-pattern is the best approach for the problem. No codebase is free of anti-patterns, and you must not aim to remove all of them.

25 patterns in four categories.

Each entry has the same structure:

The same five parts every time.

The first catalog came from Lucas Vegi and Marco Tulio Valente (ASERG/DCC/UFMG), in Understanding Code Smells in Elixir Functional Language. For security guidance, the Security Working Group of the Erlang Ecosystem Foundation publishes resources for Erlang and Elixir at security.erlef.org.

Site code: MIT. Pages and diagrams come from the Elixir documentation (Apache-2.0, snapshot of 2026-10-08, Elixir 1.20). This project is not affiliated with the Elixir Team.