True JS programmers are still living without TS, and TS programmers haven't evolved into some culture which could compete with them. That makes TS-based solutions inherently worse.
Ask HN: Is TypeScript worth it?
431–440 of 469 posts
Re: Ask HN: Is TypeScript worth it?
#432Earlier quoted context omitted.
try out dart, its much better than TS
That's subjective and I'm sure it is for you. I personally prefer TypeScript. I'm glad to see passionate developers keeping on both sides. That's how we grow and become better.
TS is more popular due to combination of google dropping the ball in defining the standards and getting others onboard with them cause they overestimated the leverage they have, failure at marketing it and how everyone is already bought into Javascript.
Re: Ask HN: Is TypeScript worth it?
#433[flagged]
Re: Ask HN: Is TypeScript worth it?
#434I've been working with JavaScript for 20 years. And 5 years with TypeScript. And, well. I still am not convinced. Too much overhead for me. I really dislike typing obvious things and boilerplate. Probably my fluency with JS is to blame. I don't need to see types and autocompletion. If I really need to — I just go to the source and inspect the source code, that is how I familiarise myself with the interface. I also th…
It's a glorified way to put "slowing you down". When you go to your root store key and think about a better name, a single rename action traces all the usages _safely_ down throughout the whole codebase, across packages in a workspace; now compare that with the manual process. No, search & replace doesn't come close to this convenience. Having this kind of refactoring ability at hand makes you speedier, flexible, adaptive, exploring new ideas, and it makes work fun - these in fact makes one a better developer.
Re: Ask HN: Is TypeScript worth it?
#435I've been working with JavaScript for 20 years. And 5 years with TypeScript. And, well. I still am not convinced. Too much overhead for me. I really dislike typing obvious things and boilerplate. Probably my fluency with JS is to blame. I don't need to see types and autocompletion. If I really need to — I just go to the source and inspect the source code, that is how I familiarise myself with the interface. I also th…
That was the center of reservations against TS until I figured out that it's the wrong way of using it. Normally you very rarely have primitive type annotations, or any kind of obvious things, because that's inferable.
Re: Ask HN: Is TypeScript worth it?
#436Are tests useful? Because this is what TypeScript gives you: it helps you avoid regressions. If I change a signature, tests fail. If I pass junk data, tests fail. It's like invisible live tests and people forget this. As in the other recent discussion, yeah, you can live without tests and you can live in JS-land. Whether it's worth it it depends on you. TS and traditional testing lets me ship updates without even ope…
Tests are great and the usual argument from static typing opponents is that they almost completely replace the regression safety from static typing. Types are not the same as tests at all, tests are much better at giving you a glimpse of what the code even does. For clarity, I'll define a static typing opponent as somebody who believes that the return on investment for static typing is negative.
Types do that, they tell you the expected input and expected output. No type nor test is all-encompassing of course, but it gives at least some information.
No test will guarantee that a function will never return a number. Types, if valid and without prototypal shenanigans, can.
Re: Ask HN: Is TypeScript worth it?
#437I'm old enough to have worked on two different large enterprise applications which predated TypeScript and it was a nightmare. Personally I've found that JavaScript lends better to a functional style of coding but there are no protections in the language to enforce this and both codebases I saw had a weird mismatched set of object oriented and functional style principals. Defined classes, prototypical inheritance, mo…
Re: Ask HN: Is TypeScript worth it?
#438I've been working with JavaScript for 20 years. And 5 years with TypeScript. And, well. I still am not convinced. Too much overhead for me. I really dislike typing obvious things and boilerplate. Probably my fluency with JS is to blame. I don't need to see types and autocompletion. If I really need to — I just go to the source and inspect the source code, that is how I familiarise myself with the interface. I also th…
Re: Ask HN: Is TypeScript worth it?
#439Re: Ask HN: Is TypeScript worth it?
#440I've been working with JavaScript for 20 years. And 5 years with TypeScript. And, well. I still am not convinced. Too much overhead for me. I really dislike typing obvious things and boilerplate. Probably my fluency with JS is to blame. I don't need to see types and autocompletion. If I really need to — I just go to the source and inspect the source code, that is how I familiarise myself with the interface. I also th…
Obvious things may not look obvious from other programmers or for yourself sometime in the future or from a code you'd written while feeling asleep.
If you'd totally think that's an obvious overhead, just give it "any". Though I never use it.
Automatic type mismatch warning and auto completion in the editor feels quite worth the little "documentation" static typing effort.
Of course, if anyone is using some basic editors that don't even highlight TS errors in real time, then it feels like a complete waste of time.