3 ms·
Test coverage is crucial as code matures and is finalized, not necessarily when it is prototyped - which is exactly where a type system gets in the way. I disa
by orgomon 10y ago
Test coverage is crucial as code matures and is finalized, not necessarily when it is prototyped - which is exactly where a type system gets in the way.
I disagree with the idea that you need to write more tests because of dynamic typing, my claim is that the tests you have to write anyway also cover type errors. Just running your code yourself covers most type errors.
- pixie_ 10y agoTyping doesn't get in the way of prototyping code. On the contrary it's essential. When you're starting out a new project the tendancy to refactor is very high. Everything is changing and in flux as you go from nothing to something. Having static typing makes refactoring quick, easy, and most of all safe. Developing new projects for myself in TypeScript vs JavaScript is exponentially faster.
- k__ 10y agoIf you know types from, Java, then you're in for a treat. TypeScript is so much better to work with. Most of the time it feels like ES2015.
- bubersson 10y agoI have this only from experience, no hard numbers, but I've seen the types make more and more sense with more developers developing the same app. If it's just upto 2 devs I would consider writing it in plain JavaScript. Currently we have around 8 devs in frontend and having type checking via Closure saved us so many times. It's also nice to use the same struct definitions both on Go server and in JS (we have the structs defined by protobufs and we generate both Go files and Closure JS annotations from it). It also gives us nice autocompletion in the IDE.