Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because TypeScript is the de facto standard way of writing JavaScript for most of the industry and it has killed all of the other compile-to-js languages.

The chances of it going out of favour are very slim, there's a giant ecosystem built on it and the language is very well loved by devs (should be second only to Rust).

Microsoft has 50 people on payroll working only on TS. Any competitor needs a gargantuan investment.



> Because TypeScript is the de facto standard way of writing JavaScript for most of the industry

It really isn't, but I guess that's really context specific. What country and sector are you talking about? For US-SaaS, what you're saying is probably true, but there is a whole world outside of that, and JavaScript is with 99% certainty much more wildly used than TypeScript.

> and it has killed all of the other compile-to-js languages.

Also it hasn't. I've been writing ClojureScript for the last 5 years, almost exclusively. And while the community is small, I wouldn't say it's "dead" or been killed. There are a bunch of compile-to-JS languages that haven't "been killed", besides ClojureScript.

But it serves basically the opposite niche compared to TypeScript.

> The chances of it going out of favour are very slim

Same has been said about everything, always, and it's always not true. Winds change, and surely so shall the winds of TypeScript. Not being able to see that it's possible, will put you at disadvantage.


Technically Haxe is still a thing, though its typical use case these days is almost 100% game development (including the JS target).


And JavaScript has a bigger ecosystem and more entrenchment, not to mention an international standard.


Not sure how's that relevant.

Any valid JavaScript is valid TypeScript and you're gonna write and read TS anyway in the industry.

They aren't in competition, but coming back to the first comment it sounds reasonable to start directly with TS for many users.


Your experience is not the industry. JS is widely used, almost certainly more than TS.


My experience may not, but the annual JS dev survey points that TS is the main way to write JS from years.


and not to mention terrible.


I use TS, I like it.

I'm not sure you're 100% right about it overtaking JS for most of the industry.

I wouldn't recommend it to beginners until they've learned JS because it's a lot of stuff to learn on top of JS to achieve basically the same outcomes (with fewer bugs). Chapter 5 in the Eloquent JavaScript book gets to higher order functions, which in TS means Generics. Nobody needs to learn Generics in Chapter 5 of their programming journey.

You also don't really appreciate how useful TS is until you've battled at least one project in plain JS.

(Arguably you can go a long way without HoF too, but perhaps not if you're hoping to understand other people's code.)


Flow has about a dozen of important features that typescript lacks (while being 10x smaller in terms of LoC).


Flow is basically a dead project outside of Facebook.

https://npmtrends.com/@babel/preset-flow-vs-flow-bin-vs-type...


Not that I think download metrics is the best metric to decide that, but even with that, flow-bin has almost half a million of downloads per day. That's far away from dead, at least in my world. And I'm guessing that doesn't count anything from Facebook as they most likely run their own registries.


flow-bin has substantially fewer downloads than coffeescript and both are declining. That is a dead project.

https://npmtrends.com/coffeescript-vs-flow-bin


It's not as popular as typescript but not dead, it's consistently active for a decade [0].

Compare it with typescript [1] contributions if you want.

[0] https://github.com/facebook/flow/graphs/contributors

[1] https://github.com/microsoft/TypeScript/graphs/contributors


Don't you find it interesting that node-fetch is slightly less-dead otherwise has exactly the same "aliveness" as typescript [0] from your source (click 5 years)?

[0] https://npmtrends.com/node-fetch-vs-typescript




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: