This post is a joke right? The world has moved on. JS *is* the target, but it is *no longer* the source. There is so much more to software development than the how quickly one can vomit code into their editor of choice. If typescript is slowing you down, your code is *bad*. End of story. Continually pretending that types don’t matter is laughable. The thousands of dynamic language projects with littered with type-hin…
Ask HN: Is TypeScript worth it?
401–410 of 469 posts
Re: Ask HN: Is TypeScript worth it?
#402I worked in two different team in two different companies where a full rewrite of the core system was done in typescript. The technology itself had few issues like compilation time and inability to run the application locally because of reasons. The new systems were so complicated that everything ended in neverending bike shedding. The people pushing for "everything to be written in typescript including other teams t…
Yes because Typescript is so obviously good. It's like saying "the pro-seatbelt people are a very inflexible crowd". Well duh!
Typescript compile time is not great but you can set things up so it doesn't block running (i.e. you ignore errors until you want to fix them). There's no issue with running Typescript locally.
> It's soul crushing...
It's soul crushing to work with people who don't want to do things properly. Endless string and duck tape (aka bash and python) and fighting fragile tools.
Re: Ask HN: Is TypeScript worth it?
#403Earlier quoted context omitted.
try out dart, its much better than TS
How is it objectively "better"? This depends on context. I am sure Dart is worse given a specific condition. I'm not bashing dart, but you cannot say that "A is better than B" without any sort of context to the statement. It's like saying "apples are better than oranges".
There are a couple of features that I miss from Typescript: the biggest by far is tagged unions.
But I would still pick Typescript for a web project for two reasons:
* The community is like 1000x bigger. Even though a lot of it produces extremely low quality code, there's still a lot more solid JS libraries than Dart ones.
* Debugging is slightly easier since the compiled JS code is essentially identical to you TS code. Chrome has pretty great support for Dart, but if you ever have to delve into the generated JS it is quite painful.
Re: Ask HN: Is TypeScript worth it?
#404Earlier quoted context omitted.
Let me clarify - I pretty much agree with what the parent says - "it's more like 70% BS vs. 30% value". I do still want that value i.e. static typing, but as you point out I can't get that without the BS. And so I would rather have no typing which is the only other option (except using a different language).
> And so I would rather have no typing which is the only other option (except using a different language). This part is what is so wild to me. I simply cannot imagine throwing the baby out with the bathwater, so to speak, to throw out the entirety of static typing just because of the BS around it. In my experience, static typing is superlative, it would have to be some extremely rare situation for me to give it up.
Webpack added a lot of overhead - but if you know what came before it, it was a godsend. React added a super complex library, vs Backbone which was only a few hundred lines of code but React is totally worth it.
I'm not just trying to hark back to "the good old days", I think the ecosystem is a big improvement from where it came from but I just haven't seen enough benefit from TS for all the work you need to put in.
Re: Ask HN: Is TypeScript worth it?
#405As i said before, a lot of people expect that writing typescript is as easy as writing js, which is not. I estimate the typescript tax to be around 40-100% more time, especially if you want to do typescript right and not use `any` all over the place. And besides, typescript is a poor fit for someone who is used to writing highly dynamic, lambda based code, which is one of the main niceities of js. My guess is that a…
Any time you lose writing type hints you gain back from better IDE support and fewer bugs.
It's really a no brainer. I can only assume everyone here arguing against it works on one-man projects using Notepad.
Re: Ask HN: Is TypeScript worth it?
#406Earlier quoted context omitted.
These estimations are pure imagination. I doubt you have `any` real data to support it. Also, that is not the reason why Typescript was created, nor the reason why people adopt it, not even what Typescript really is. Today, almost every Node.js framework supports Typescript out of the box. I challenge you to provide a modern framework that doesn't provide types. And this is not an opinion, nor it is wishful thinking,…
I work with typescript everyday. I review prs, i mentor junior devs that are learning typescript. Ofcourse this is my experience, maybe yours is different, if so please tell me about it. The only thing i said is that there is an upfront cost in velocity that people are usually not considering when they are choosing to use ts over js. Sure, that cost may be amortised in fewer bugs and easier collaboration across large…
Re: Ask HN: Is TypeScript worth it?
#407Re: Ask HN: Is TypeScript worth it?
#408Earlier quoted context omitted.
This is exactly what I struggle a lot with. I just want JavaScript with simple type checking. TypeScript goes way overboard. I also hate TypeScript decorators. I've seen that grossly abused in codebases that just drive my insane.
Maybe we should just jump to a different timeline in which Facebook's Flow won the war against TS
Re: Ask HN: Is TypeScript worth it?
#409It requires so much mental effort to understand what's going on
Re: Ask HN: Is TypeScript worth it?
#410Hoenstly, for production code, TS makes me sleep better. No matter how many tests you write, that one undefined object will get you at some point. TS helps to eliminate a complete set at compile time (as you know) and that's great! Anecdotal evidence from my Haskell experience: If my Haskell programs compiled, they usually worked. Which is amazing. Powerful types for the win.
> Anecdotal evidence from my Haskell experience: If my Haskell programs compiled, they usually worked. Which is amazing. Powerful types for the win. I have the same feeling regarding Haskell, Elm and Swift, the latter I program in 99% of the time. I really don't feel like I get the same sense of security from Typescript, to be honest. Maybe I'm not using it correctly? I tend to lean more towards OP's opinion. I would…