by jtdev · 6y ago · 0 comments
Have you written and deployed production code in the languages you mention above? Did you encounter a substantial number of type errors?
Is a '.close()' method being called twice a type error? It is in a language that can express states in the type system.
Is SQL injection a type error? It is when you use refined types in your sql library interface.
The vast, vast majority of errors I run into are errors that, with effort and the right type system, I could turn into type errors.
The point being that asking "would those be type errors?" is a really big question that is, when answered simply, "yes".
Pyflakes and unit tests will detect the great majority of potential errors. Mypy gets you closer to zero.
No, it's a pragmatic argument. There's no circularity it.
If they're not mainstream, then they're neither "very usable" or "well-supported" to any extend that a mainstream language would be.
Injections are handled by any language with taint, although that became less popular. Perl had it. Anything with typed orm also has something similar (for example Esqueleto in Haskell)
It's when you want to add features to a codebase you don't understand, when these features shine.