Live data from Hacker News

Ask HN: Is TypeScript worth it?

news.ycombinator.com

211–220 of 469 posts

Re: Ask HN: Is TypeScript worth it?

#211
v) It adds so much extra complexity.

vi) You trade a few type bugs that are easily debuggable and avoidable for type composition and hierarchy bugs which are hard to find.

I have seen good examples of TS that make sense and made to play with functional paradigm, but in practice it was always a bloated mess of OOP JS introducing heirarchy where none is required producing components that are too-tightly coupled and resistant to change and slowed down developing for at least x10.

Re: Ask HN: Is TypeScript worth it?

#212

Earlier 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,…

Strongly typed languages already did take over the software development paradigm. It happened when Java, C++ and C were the dominant languages. Then it regressed back to dynamically typed languages as ruby, php, python and js skyrocketed into popularity. With the advent of typescript and other things like it... types are now back in vogue but for how long? The universe is a four dimensional loop. Programming, like hi…

> types are now back in vogue but for how long?

Probably until startups and organizations that use more flexible languages race past those who strongly type things. Just like in the early days of the web and actually for ~2 decades in which everyone who used loosely typed languages raced past those who strongly typed stuff due to the ease of use and flexibility. If typing was the way to go, already existing typed languages would rule the roost. But they didn't.

The end users dont care about any engineering concerns that we have. They care whether they can do what they want with an app or service. And organizations that can ship code fast will keep their strong advantage.

Re: Ask HN: Is TypeScript worth it?

#213

TS can't solve any real problem, so skip it. Dart & Flutter worth it if you need cross-platform GUI.

Flutter web isn't that great. Even scrolling is a fundamental issue with it which is never going to be fast using their current approach.

Re: Ask HN: Is TypeScript worth it?

#214
Is it worth it compared to what? Plain JS? Transpilation from a different language? Rust? Growing apples?

I have used plain JS, GWT, and TypeScript. TS is an incredible improvement over the two others. The TS type system is excellent, very expressive and helpful. An important advantage you get from static typing is that your IDE has more information to work with and so becomes more powerful. If you code in a text editor, you won't reap the full benefits, and you'll have to do more of the grunt work yourself.

Re: Ask HN: Is TypeScript worth it?

#215
I have been writing lots and lots of TypeScript in the last 5 years.

Going back to JavaScript just feels...wrong.

TypeScript isn't a perfect language, but I also feel like most of its shortcomings are related to the aim of being a JS superset.

Re: Ask HN: Is TypeScript worth it?

#216
post #178

> Is Typescript worth it? > I want to skip over the static typing benefits argument… Typescript, as the name implies, adds types to your script. If you don’t see the benefits of types then typescript may not be for you. > My issue is with the amount of extra work it places on developers… and doesn't deliver all that much value. If you think adding types doesn't add much value then typescript may not be for you. In my…

> If you think adding types doesn't add much value then typescript may not be for you. In my experience, types are defined once then provide a lifetime of value You have misunderstood the OP. The full paragraph is: >> 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 syste…

But that is either not a properly formulated argument, or it denies the benefits of strict(ish) typing. You reformulate it so that one weighs out the other. That would only be the case for projects where you do more work integrating libraries than actual programming. That's something much easier to discuss (IMO), but is it what OP asked?

Re: Ask HN: Is TypeScript worth it?

#217

Are 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…

While I agree that static typing provides some of the benefits of unit tests, I think it provides much more than that: compiler-assisted renames, code completion, extra code documentation...

Re: Ask HN: Is TypeScript worth it?

#218

Earlier quoted context omitted.

Thanks for responding, and thanks for your work for the community! I sometimes place myself in the shoes of devs building TypeScript, especially when I am a little frustrated, and most of the time I realize that a lot of these issues are incredibly hard to solve. > i. Dependency management is indeed frustrating. TypeScript doesn't create a new major version for every more-advanced check. In cases where inference migh…

Re libraries incompatible with certain typescript versions - e.g. protobufjs fix - it’s been my experience that you want to try and only use compilers specific to each library and compile libraries separately. It’s unfortunate but the JS community often tries to run all JS for a project through the same single compiler tool chain, using one global version of the compiler instead of relying on and effectively linking…

This is a very interesting idea!

Re: Ask HN: Is TypeScript worth it?

#219
post #202

Earlier 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 converted a few codebases from JS to TS and this takes a surprising amount of time. I won't put out estimates but it's definitely non trivial. > I challenge you to provide a modern framework that doesn't provide types Ruby on Rails

He was clearly talking about nodejs frameworks.
Post reply on HN