4 ms·
I've noticed in a few examples that the people who dislike TypeScript and use pure JavaScript generally are really good at keeping track of things in their head
by labrador 3y ago
I've noticed in a few examples that the people who dislike TypeScript and use pure JavaScript generally are really good at keeping track of things in their head so they can go fast when they write. I'm not good at doing the housekeeping in my head, so I appreciate tools like TypeScript. I go slower, but it saves me time in the long run.
edit: right -> write
- iddan 3y agoAlso, quality doesn’t scale. These people can do whatever they like when they work alone but once you get more people to work with them their claim falls apart like an unsafe function call
- moron4hire 3y agoThey're also just blissfully unaware of all the bugs in their code.
- doctor_eval 3y agoRight, I always suspect there’s bit of Dunning-Kruger going on when I read about people who reject compile time type safety.
- moron4hire 3y agoYes, there's really no reason to believe someone when they say they get along perfectly fine without strict typing. Every project I've converted from JS to TS, no matter the size, even the small, only a few hundred LOC projects, has had at least one major "how the hell did this ever work" type bug that the type checking discovered immediately and would have prevented from happening in the first place. So I don't really do even small projects without TS anymore. Anything more than can fit in my text editor, without scrolling, with the editor window tiled so I can see the app and the debug log at the same time.
- doctor_eval 3y agoYes, exactly my point. How do you know that your code doesn’t have subtle bugs when one of the systems that detects subtle bugs isn’t available? I used server side JavaScript for a decade before Node existed, so I have lots of experience with this sort of thing. And don’t even get me started on refactoring.
- manuelabeledo 3y agoThis. I get that there are some devs that dislike verbosity and love flexibility, but I'm not one of them, and in larger teams, there are more than one like me, so we are going to make mistakes. Any tool that prevent me from shooting myself in the foot, is appreciated.
- egonschiele 3y ago> generally are really good at keeping track of things in their head Inherent in that is their teammates will not be able to go as fast as them.
- justrealist 3y agoWell it helps that the iteration loop on the FE is generally really fast, so type errors are really quick to debug. You rarely even have to run a test suite, just load the page on a local node instance, get an error, print the object, refresh, takes 10 seconds. For BE code it can take 10 minutes to hours to deploy with debug info, so type errors are a huge PITA and strong types are critical.
- doctor_eval 3y agoThe problem is not debugging the type error, the problem - as in this article - is not detecting it in the first place.
- rhaway84773 3y agoI dont get this defense of using JS. Ok, maybe a dev is much faster writing JS because they keep stuff in their head better. But I’m assuming they also use third party libs, or functions that other devs in their team have written that they just need to call. Typescript makes it easy for the IDE to show you what exactly you need to pass to call the teammate’s function (and this was the originally motivation behind typescript…improving MS dev tooling) without having to dig into the code or read the documentation. And type inference means you’re rarely actually writing out the types. So I find it hard to believe that anyone writing a relatively complicated piece of code would be faster using JS over TS. Small scripts and the like, sure. But complete complex applications? I doubt it.