4 ms·
A big benefit with static typing is the ability to refactor easily. It takes time to get design and code right, in a way that captures the requirements well as
by jeswin 7y ago
A big benefit with static typing is the ability to refactor easily. It takes time to get design and code right, in a way that captures the requirements well as well as code quality. With static typing, you get immediate feedback while you tune your code.
Most of the popular large JS projects have switched (or are switching) to TypeScript (or Flow for React, though they'd have used TypeScript today). So that supports the argument in favor of TypeScript.
- joelbluminator 7y agoI don't know the js world that well, can you provide links that show most js developers use typescript? There are arguments for both. There are still millions of python/php/js/ruby devs and codebases that use dynamic code. It could be that in javascript the gains of types are more felt than in Ruby/Python. '' + [] will raise an error in Ruby and probably python too.
- angus_gh 7y ago> can you provide links that show most js developers use typescript? They didn't say most developers had switched, they said most large projects have switched