|
|
|
|
|
by shazzdeeds
1789 days ago
|
|
We use the dialyzer and also heavy usage of the @spec function signature annotation on public module functions to work around this. It’s an nice compromise between some defensive safety while still enjoying the readability of the dynamic typing. |
|
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.