5 ms·
> To improve our situation, we decided to give static type checking a shot. I wonder why it took you years to realize this. I'd never use a dynamically typed l
by sydd 10y ago
> To improve our situation, we decided to give static type checking a shot.
I wonder why it took you years to realize this. I'd never use a dynamically typed language for more than a few hundred lines of code, it becomes an unmaintainable mess afterwards.
So serious question: Why?
- azrazalea 10y agoIn case you are wondering about the downvotes: There are millions(trillions?) of lines of code out there that is maintainable and dynamically typed.
- jiaweihli 10y agoMaintainable, but at what cost? A large chunk of unit tests for dynamically typed code is dedicated to checking types.
- felixrieseberg 10y agoIt's probably worth pointing out that Slack _also_ contains a ton of native code, written in C++ (with a bit of C++/CX and Objective-C). All of us on our small team have an extensive background in typed languages, including giant code bases (Windows, for example). We just also happen to really like JavaScript, feeling that it and the ecosystem around us makes us more productive given our needs. TypeScript a few years ago was simply not good enough, and neither were the alternatives. It's okay if you feel otherwise, but trust that there are quite a few developers out there who are comfortable with building and maintaining rather large JavaScript codebases, building pretty impressive applications with it. This post isn't yet another "JavaScript is terrible" rant, I quite like it.
- dilap 10y agoI'm right there with you, but dynamically-typed languages still have their advocates (though it seems they're losing out more recently). (I think this is because a lot of the advantages associated with dynamic typing were in fact portable back to statically typed languages. If you're comparing C++98 to Python, the dynamically typed language seems pretty nice. If you're comparing Javascript to Golang or TypeScript, not so much.)
- alkonaut 10y agoWhen discussing static-vs-dynamic typing and the argument from the dynamic advocate is "I don't want to type types everywhere", the debate is over. There are a few valid arguments in favor of dynamic typing - but that isn't one of them.