Re:The Human Side of Elixir
by h0l0cube on Wednesday July 28, 2021 @08:52PM
(#27991544)
Agreed. In my experience, typespecs and dialyzer has caught a bunch of bugs living on rare code paths. If I had neglected to test those code-paths, they might have found their way in production.
And what's liberating is that there can be multiple types (including patterns) for each argument and the return value, and the spec can capture all those details. This combination of specificity and flexibility is unthinkable in most languages.
And what's liberating is that there can be multiple types (including patterns) for each argument and the return value, and the spec can capture all those details. This combination of specificity and flexibility is unthinkable in most languages.