3 ms·
It's frustrating that the only reason thats really given for TypeScript being "better" than Babel is that it has more downloads, using incorrect charts to prove
by thejameskyle 10y ago
It's frustrating that the only reason thats really given for TypeScript being "better" than Babel is that it has more downloads, using incorrect charts to prove it.
Here's the actual download charts if you are interested:
https://twitter.com/thejameskyle/status/725344218411986946 https://twitter.com/thejameskyle/status/725344218411986946
Source:
- babel-core: http://npm-stat.com/charts.html?package=babel-core&author=&from=2015-04-28&to=2016-04-27 http://npm-stat.com/charts.html?package=babel-core&author=&f...
- typescript: http://npm-stat.com/charts.html?package=typescript&author=&from=2015-04-28&to=2016-04-27 http://npm-stat.com/charts.html?package=typescript&author=&f...
Also if you want types with Babel, use Flow– which is arguably a much better type system anyways.
- avolcano 10y agofwiw, TypeScript -> Babel is doable, if painful. I have it set up in my repo here: https://github.com/thomasboyt/manygolf https://github.com/thomasboyt/manygolf I agree that Flow currently the superior type system (and, unlike TypeScript, not a complete nightmare to set up if you're wanting to use Babel/Webpack instead of manually running file builds through your editor like it's 2002), but TypeScript has significantly more momentum behind it making it a much more practical solution for basically anyone who doesn't currently work at Facebook. There are also several exciting new features coming to the type system that brings it closer to parity with Flow: Non-nullable types: https://github.com/Microsoft/TypeScript/pull/7140 https://github.com/Microsoft/TypeScript/pull/7140 Control flow type analysis: https://github.com/Microsoft/TypeScript/pull/8010 https://github.com/Microsoft/TypeScript/pull/8010 I wish TypeScript tried to better-integrate with the greater JavaScript ecosystem and stop acting as a language of its own. Thankfully, the "es6" target gets it pretty close (I think it still compiles some es7 features, meaning you can't have Babel handle everything yet), and the non-standard module syntax seems to be a thing of the past. I hope the gap can be bridged between the TypeScript and Babel communities, so that TypeScript can one day be shipped as a Babel transform, same as Flow.
- thejameskyle 10y agoThere's not really a gap between them. I've spoken to people on the TypeScript team a number of times. Jonathan Turner and I talked about sharing ASTs once, and I gave an internal presentation about Babel at Microsoft last year. Also, there's tons of people that use TypeScript for type-checking and stripping types and then use Babel for compiling down ES2015 code since Babel follows the spec closer.
- WorldMaker 10y agoNot to mention that currently Typescript doesn't emit certain types of polyfills so it can be handy to let Babel manage that.
- endergen 10y agoWhat makes you say flow is a better type system?
- maaaats 10y ago> Also if you want types with Babel, use Flow– which is arguably a much better type system anyways. Why? Besides, kinda ironic you point out the lack of reasoning in the article, then making a bold claim on your own providing no arguments.
- thejameskyle 10y agoI've given up on trying to have serious discussions about these things on Hacker News. It's a really bad community for that sort of thing. Find me elsewhere if you want to have that discussion.
- maaaats 10y agoEver wondered if it's exactly because of people discussing like this?
- thejameskyle 10y agoI don't particularly care what it is. This is the discussion forum where I've been told that Babel single-handedly has "destroyed the web platform" and all sorts of just senseless attacks, including ones that get way too personal. No, if this community wants to act like a bunch of 12 year olds then that is their prerogative, but I'm not going to be part of it. Again, I'm more than happy to talk about this anywhere else.
- softawre 10y agoSo you're taking your ball and going home? LOL. Nana nana boo boo!
- itaysk 10y agoThe charts are not to say the TypeScript is better then Babel, it's to show that 'it has won'
- SonicSoul 10y agothese are just npm stats. this ignores nuget (visual studio equivalent) and other ways it can be installed including direct download