4 ms·
The wide adoption of Flow and TypeScript means that people are starting to realize that explicitly typed code is easier to maintain than implicitly typed code.
by partycoder 9y ago
The wide adoption of Flow and TypeScript means that people are starting to realize that explicitly typed code is easier to maintain than implicitly typed code.
Hopefully a new EcmaScript version adds the ability to specify types. It's either that or people opting out of JS in favor of wasm based tech in the near future.
- tracker1 9y agoI think it largely falls to the size and discipline of the teams doing the work. I get by pretty well without them, but if I had to coordinate with over 20 other developers working in a single codebase, then I'd have a differing opinion. I'd also be pushing for 100% test coverage as it's FAR easier to do in JS than it is in other languages. Of course, adding types makes it harder again.
- fedlarm 9y agoI used to share this opinion as well, until I started working on an internal library that was created by a skilled developer. He had very good test coverage and good quality tests, which turned out invaluable, once I got on board. We tried to move to library towards being fully typed in TypeScript, just to get some experience with TypeScript. Our first thought before starting was, that it would help, but didn't expect it to have a significant impact. During the port to TypeScript (and being strict on typing everything possible), we soon found numerous unexpected behaviors in the code. Some of the issues found, could have been found by a linter, but other things like models changing over time was only found due to adding static types. After this experience I changed my opinion towards the value of static types, from being more than a nice to have feature.