News for hackers. Stuff that matters.
Re:TypeScript Won by thejameskyle on Wednesday April 27, 2016 @11:39AM (#11581372)
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

Source: - babel-core: http://npm-stat.com/charts.html?package=babel-core&author=&f... - typescript: 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.

Re:TypeScript Won by avolcano on Wednesday April 27, 2016 @11:47AM (#11581472)
fwiw, TypeScript -> Babel is doable, if painful. I have it set up in my repo here: 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

Control flow type analysis: 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.

Re:TypeScript Won by thejameskyle on Wednesday April 27, 2016 @12:31PM (#11581954)
There'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.
Re:TypeScript Won by WorldMaker on Wednesday April 27, 2016 @01:21PM (#11582436)
Not to mention that currently Typescript doesn't emit certain types of polyfills so it can be handy to let Babel manage that.
Re:TypeScript Won by maaaats on Wednesday April 27, 2016 @11:57AM (#11581593)
> 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.

Re:TypeScript Won by thejameskyle on Wednesday April 27, 2016 @12:16PM (#11581769)
I'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.
Re:TypeScript Won by maaaats on Wednesday April 27, 2016 @12:27PM (#11581898)
Ever wondered if it's exactly because of people discussing like this?
Re:TypeScript Won by thejameskyle on Wednesday April 27, 2016 @12:34PM (#11582000)
I 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.

Re:TypeScript Won by softawre on Wednesday April 27, 2016 @12:45PM (#11582112)
So you're taking your ball and going home? LOL. Nana nana boo boo!
Re:TypeScript Won by endergen on Wednesday April 27, 2016 @11:48AM (#11581488)
What makes you say flow is a better type system?
Re:TypeScript Won by SonicSoul on Wednesday April 27, 2016 @02:49PM (#11583407)
these are just npm stats. this ignores nuget (visual studio equivalent) and other ways it can be installed including direct download
Re:TypeScript Won by itaysk on Wednesday April 27, 2016 @12:04PM (#11581662)
The charts are not to say the TypeScript is better then Babel, it's to show that 'it has won'