6 ms·
> Because static type analysis allows you to develop more accurate code faster and with lower maintenance cost. This statement may be true for you, but it's no
by mjackson 13y ago
> Because static type analysis allows you to develop more accurate code faster and with lower maintenance cost.
This statement may be true for you, but it's not for everyone.
It's a dangerous argument because it assumes that static types are going to somehow magically turn bad code into good code, or (by extension) bad coders into good ones.
Static typing is a not a solution to the problem of any deficiencies in the language, but rather the problem of people shooting themselves in the foot with it. It's admittedly a related problem, but a separate one.
- marcuswestin 13y agoI also said: > (and with all that said, the most important thing to consider is this: what tool will best allow you and your team to build and maintain your intended product?) I'd defend the statement you quoted like this: all languages are type. Dynamic languages simply have exactly one expression type, "any". Specifying multiple types affords you strictly beneficial abilities. Static type checks is probably the most significant. Performance improvements and highly specific and accurate code editing assistance (e.g auto suggest) can also be significant. But yes, you're absolutely right. Nothing but sincere effort, lots of practice, and critical thinking can make you a better programmer. At the same time, a great carpenter becomes even so much better with a properly weighted hammer and an accurate lever. :)