top | item 35947165

(no title)

erszcz | 2 years ago

> But even assuming Dialyzer is as good as TypeScript, have you found that the libraries you use actually have quality type definitions?

Strictly speaking, Dialyzer has two big benefits over more traditional type systems:

1. It doesn't require type definitions to be present, it can type check code having none at all.

2. "Dialyzer is never wrong", i.e. it never returns false positives, i.e. it's an underapproximating checker.

These are the design decisions taken by the tool authors. There's rationale behind them, though the experience of using checkers for other languages might not be 1-to-1 applicable because of that. These decisions come with downsides, of course, some of which are covered in this thread, so I won't repeat them, but in general they were taken deliberately due to characteristics of the language(s) (it was originally created for Erlang, not Elixir) and the state of type system theory at the time. Please bear in mind Dialyzer was created in 2006, some 6-7 years before TypeScript.

discuss

order

No comments yet.