2 ms·
> Types, man, types. Elixir has no types. Elixir (and BEAM more generally) has Dialyzer, which does static analysis including (but not limited to) type checkin
by dragonwriter 1y ago
> Types, man, types. Elixir has no types.
Elixir (and BEAM more generally) has Dialyzer, which does static analysis including (but not limited to) type checking.
- te_chris 1y agoAlso the language is strongly typed and has a compiler which they’re adding more compile-time type checks to.
- mtndew4brkfst 1y agoDialyzer is easy to intentionally or accidentally mislead, so it's only as good as the quality of human-authored typespecs (which are sometimes absent from major mainstream Hex packages) and the inference is simultaneously more open-ended and unhelpfully precise than most people are accustomed to if they have prior experience with something like Rust or TypeScript. People also frequently struggle to accurately interpret its output. I still find dialyzer to have non-zero value, but it's not uncontroversial and it's not usefully integrated with the vanilla language tooling. Mix/elixirc is not generally going to throw you a bone if you violated a syntax-correct type spec. It's an opt-in secondary tool and that diminishes its utility a tad.