Precision in Type System Design
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
José Valim argues in a Dashbit blog post that precision in type systems matters, using Elixir's set-theoretic type system as the example: distinguishing empty from non-empty lists lets functions like Enum.max_by avoid needless runtime raises, but added precision can force more proof burden on programmers and make type signatures more…