4 ms·
Static vs dynamic typing aka catching type errors on compile and not on runtime. Easily refactor code and all references there of. I would also say that I‘m fas
by pferdone 8y ago
Static vs dynamic typing aka catching type errors on compile and not on runtime.
Easily refactor code and all references there of. I would also say that I‘m faster using TypeScript BECAUSE of autocompletion, implicit code documentation through types, etc. The cost you listed are solved during the setup of a project.
I can just talk for myself, but I started a project at work and pushed for TypeScript. We now have automatically generated Swagger-clients fully typed, with a GraphQL layer infront of it with generated types for queries. Basically everything is typed now and I don‘t have to test or check incomming data or guess what kind of object I have to expect from our backend. The tooling is so good now, that the benefits outweigh any setup hassle you have upfront IMHO.
- erokar 8y agoGood points. I'm not against using TS, I just think the it should be aknwoledged that it does have costs. The nice thing about TS is that once included you can use it as much or as little as you like (for function signatures only, for instance). I also think project scope and team size is important -- the larger these are, the more I would consider TS.
- Bizarro 8y agoI used Typescript for years and found that the costs didn't outweigh the benefits for us. It slowed us down tremendously.