2 ms·
I don’t think this is necessarily a binary distinction. Even in a statically-typed language, so ostensibly with Church types, you can imagine a refined type sys
by layer8 3y ago
I don’t think this is necessarily a binary distinction. Even in a statically-typed language, so ostensibly with Church types, you can imagine a refined type system being added as type annotations. For example, many statically-typed languages do not support range constraints on their built-in numeric types, and such constraints could be added as type annotations, analogous to type annotations in a dynamically-typed language. A real-life example of this are linters with linter annotations in comments.
So instead of a dichotomy it is really a lattice of possible type refinements. And the top of the lattice corresponds to the single-type view of dynamically-typed languages. The concrete language chooses a particular point in the lattice as its universally enforced typing level. (Or sometimes just by-default enforced, if there are escapes like “unsafe”.) But the choice is among all points in the lattice, not just two points.
As a side node, it is etymologically amusing that Haskell doesn’t have Curry types.
- zokier 3y ago> I don’t think this is necessarily a binary distinction. Even in a statically-typed language, so ostensibly with Church types, you can imagine a refined type system being added as type annotations. Considering author provides LiquidHaskell as example, I'd imagine they'd agree with this sentiment > As a side node, it is etymologically amusing that Haskell doesn’t have Curry types. If I understand correctly, LiquidHaskell corrects that :)