Re:Why We Chose Typescript
by erokar on Saturday July 01, 2017 @08:44AM
(#14676868)
I agree. Type-related bugs of the kind that TS can catch are indeed rare and trivial. However, TS does help with documentation, intellisense and refactoring. Personally, I will usually go with Babel/JS, since I don't find that the benefits of static typing outweigh the costs.
[ Parent
| on HN ]
Re:Why We Chose Typescript
by emodendroket on Saturday July 01, 2017 @09:02AM
(#14676931)
I find the costs of static typing very low. What costs do you have in mind?
Re:Why We Chose Typescript
by martin_drapeau on Saturday July 01, 2017 @09:06AM
(#14676945)
Everything required to add that to regular Javascript: transpilation, extra markup and understanding and mastering a new tool. Another layer to manage and debug if you will.
Assuming you use ES6+ in production, so you need a build step anyways, would you still say TS adds costs that aren't worth it to you? And if so, which costs? I mean that in full honesty, as I generally find myself conflicted whenever I start a new project: TS or ES2015+?
Now browsers support most of ES6, so you only need build step for deployments, and can have fast reloads without a build step when developing.
Re:Why We Chose Typescript
by emodendroket on Saturday July 01, 2017 @09:25AM
(#14677008)
Oh. But these days most JS projects are in some task runner anyway.