Yep. I've had the foolish (mis?)fortune of scaling a couple of frontend projects from small to not-so-small starting in JavaScript and then converting to TypeScript. In each one, starting out with vanilla JavaScript was faster (no build!), but at some point our velocity would slow as changes required more testing infrastructure. After switching to TypeScript, we were faster than before. Sure, dealing with TypeScript…
> Sure, dealing with TypeScript can be a hassle, but it is less hassle than dealing with broken software. Can you think of examples where it's prevented broken software? I would prefer to spend more time writing good unit test coverage which in my experience would catch anything that TypeScript would have caught. I have seen it be more useful for autocomplete and self-documenting code, which I could get using JSDoc o…
Ask HN: Is TypeScript worth it?
101–110 of 469 posts
Re: Ask HN: Is TypeScript worth it?
#102You couldn’t pay me to work with Vanilla JS on any real life project. It feels like going back to horse and buggy. The biggest things I wouldn’t be able to live without: - the self-documenting nature of Typescript code (I instantly know what a function accepts and returns by hovering over it). - the comprehensive auto complete my ide gets (saves hundreds of trips to the docs / source code per day). - the incredible p…
Re: Ask HN: Is TypeScript worth it?
#103To me, install a new package and it requires "target=ESNext" and modules="ES2022" and suddenly I feel like I'm back in the Python 2 to Python 3 transition debacle.
Except this happens every couple of weeks!
Re: Ask HN: Is TypeScript worth it?
#104Re: Ask HN: Is TypeScript worth it?
#105> I want to skip over the static typing benefits argument, because I think it is well understood that static typing is a good thing and if we could bless JavaScript with a built-in and robust typing system then I don't think many people would be against that. My issue is with the amount of extra work it places on developers, much of it the "dumb" kind of work which can eat up hours and doesn't deliver all that much v…
There are other alternatives outside typescript and javascript, especially for serverside development.
Re: Ask HN: Is TypeScript worth it?
#106I know it's not an interesting answer and a lot of other people say the same thing; guess I'm just casting my vote.
Re: Ask HN: Is TypeScript worth it?
#107> I want to skip over the static typing benefits argument, because I think it is well understood that static typing is a good thing and if we could bless JavaScript with a built-in and robust typing system then I don't think many people would be against that. My issue is with the amount of extra work it places on developers, much of it the "dumb" kind of work which can eat up hours and doesn't deliver all that much v…
> In other words, you're focusing on the 20% BS out of the 80% benefits. Can the 20% be improved? Of course, but I'll take 80% benefits over 0% with JS any day. There are other alternatives outside typescript and javascript, especially for serverside development.
Clientside, I've tried a lot of compile-to-JS or WASM languages and frameworks. They're just not there yet, especially when you run into some compatibility problems, not to even mention library support on the frontend. The reason I like TS for frontend is it's just JS at the end of the day, you can strip out all of the types and it works. Therefore, things like compatibility issues are simply...nonexistent.
Re: Ask HN: Is TypeScript worth it?
#108For all the struggle, it makes me feel very confident about the code, and its reliability. That’s worth a lot.
Re: Ask HN: Is TypeScript worth it?
#109I make it about 20 minutes into a JS project before I have to go install TS because I'm losing my mind. It's such a no-brainer that the question barely parses. Javascript is medieval and typescript is... less so. I know it's not an interesting answer and a lot of other people say the same thing; guess I'm just casting my vote.
Re: Ask HN: Is TypeScript worth it?
#110I make it about 20 minutes into a JS project before I have to go install TS because I'm losing my mind. It's such a no-brainer that the question barely parses. Javascript is medieval and typescript is... less so. I know it's not an interesting answer and a lot of other people say the same thing; guess I'm just casting my vote.