4 ms·
I still don't understand adding type checkers to dynamic languages beyond Javascript, where there was no other alternative. I view the gradual type checker craz
by ilovecaching 8y ago
I still don't understand adding type checkers to dynamic languages beyond Javascript, where there was no other alternative. I view the gradual type checker craze as an admission that dynamically typed languages are a failed experiment. So why would you not just switch to a language that's designed with static typing in mind.
- Scarbutt 8y agoExisting code bases.
- c256 8y agoIn addition to the (extremely pertinent) answer above, there are advantages to dynamically typed languages in some cases, so it shouldn’t be surprising/confusing that sometimes “dynamic typing plus optional type checking with zero run-time overhead” is the best (or at least very good) of both worlds.
- quickthrower2 8y agoEcosystems
- zem 8y agothink about it the other way, and it's an admission that statically typed languages are a failed experiment because sometimes you really want to tell the typechecker "look, i can't prove this at compile time but it is correct", i.e. not have types in your code. the designer of the stanza language has a good writeup on why stanza uses optional types: http://lbstanza.org/optional_typing.html http://lbstanza.org/optional_typing.html
- umanwizard 8y agoWell not every statically typed language is so absolutist. In C/C++ you are perfectly welcome to cast things if you know you can prove things the typechecker can't.