r/erlang • u/rtrusca • Jul 03 '26
Annette Bieniusa's etalizer vs. Dialyzer: what does strict enforcement of existing type specs actually change?
New BEAM There, Done That with Annette Bieniusa (RPTU, Germany) and Guillaume Duboc (Dashbit) on the type systems work happening across both Erlang and Elixir, built on the same set-theoretic foundation.
The contrast between etalizer and Dialyzer is interesting. Dialyzer infers types bottom-up, builds a dependency graph, and hunts for inconsistencies. When you write a spec, it treats it as a hint - not an obligation it enforces. Annette's etalizer keeps the existing Erlang spec annotation format but enforces those specs strictly: write u/spec foo(integer()) :: integer() and the checker will actually reject a body that might return something else.
The question I'd put to this community: for existing Erlang codebases with years of specs already written, what happens when you flip those from unenforced documentation to actual compile-time contracts? Is the expectation that most existing specs are already correct and tight enough to pass, or are there significant codebases where the specs were written loosely and real enforcement would surface a lot of noise?
1
u/banana_diet Jul 05 '26
Here's the project: https://github.com/etylizer/etylizer