Why waste your time with half-baked type systems that try to achieve some compromise over JS idiosyncrasies. Go all in with purescript[0] :D Simple, elegant, strong typed and compiles to JS. [0]: http://www.purescript.org/
If TypeScript is so great, how come all notable ReactJS projects use Babel?
111–120 of 247 posts
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#112Why waste your time with half-baked type systems that try to achieve some compromise over JS idiosyncrasies. Go all in with purescript[0] :D Simple, elegant, strong typed and compiles to JS. [0]: http://www.purescript.org/
Because freedom? Typescript is a superset of JavaScript, which means all JavaScript is valid typescript. So you're never faced with the difficult choice of locking yourself to one language/platform. JavaScript is awesome, it just doesn't scale to large projects because you cannot efficiently refactor it. Typescript solves this problem beautifully. You can easily add whatever type information you need to effectively w…
How far can i go with typescript until i need to use babel ?
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#113Edit: Misleading charts, figures and conclusions ahead, see @nathancahill's reply https://npm-stat.com/charts.html?package=babel&package=types... Babel has faltered since the V6 release, TypeScript is still growing fast, so I'd expect the React world to follow suite, even if Facebook itself pushes Flow... NPM downloads in August (rounded): typescript: 2,000,000 babel: 620,000 (down from 890,000 in November 2015) flow…
Well, the V6 release made babel modular, so the babel package is no longer the right one to compare against. Look at babel-runtime: 4,600,000 or babel-core: 4,300,000 vs typescript: 2,100,000.
https://npm-stat.com/charts.html?package=babel-core&package=...
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#114Earlier quoted context omitted.
What do you mean "fait accompli"? Was the Dart team supposed to give the community a chance to abort the language from existing, and the community was upset that it was completed and published without the input of people who wanted it not to be?
> Was the Dart team supposed to give the community a chance to abort the language from existing No, he means that the Dart team was supposed to solicitate opinions on how to build Dart and what the best objectives for it would be, but instead they showcased it in "almost done" form, and only then tried to attract a community.
The other big problem was that it was done with the VM being a major part of the project with the intent of getting it into Chrome, obviously without having talked that much with several of the people who have significant influence over such things in (then) WebKit, even those within Google. That the VM was going to be outright objected was entirely predictable.
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#115Because a lot of notable ReactJS projects are irritatingly enamored with all the latest ES6/ES7/ESCloudCuckooLand features, not all of which are supported by TypeScript. I've noticed this a lot in the Redux realm. For every possible problem there seems to be a solution that harnesses one particular new/proposed bell & whistle.
As far as I've seen, it's really only Object spread (likely ES2017 feature) that's commonly used that is not yet supported by TypeScript. Microsoft has promised support for it in TS 2.1, and generally stays on top of ECMAScript proposals that have gained enough traction that they seem likely to ship.
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#116Earlier quoted context omitted.
> Dart doesn't introduce that many advantages over JS for all of its differences As someone with experience in both languages, I could not disagree more. > Dart was originally presented as a wholesale replacement of Dart I think you meant replacement of JS here. I guess it depends entirely on what you think of JS as a language. I, for one, would rather a language that fixes core issues with JS, instead of just being…
> As someone with experience in both languages, I could not disagree more. Elaborate then. Because one's major advantages can be another's (and sometimes, objective) trivialities...
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#117Typescript is a pile of crap that's why.
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#118I was always wondering why HN crowd is ok with TS and so prejudiced against Dart - Dart has NG2, await async in older browsers and good tooling (webstorm, vscode) and much saner package system. When doing lot of small web apps - it's easier to mantain.
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#119Earlier quoted context omitted.
Dart has gradual typing > working with existing build tools and module systems I'd say they replaced it with a better tool, pub. The one good argument you have there is .d.ts files. Dart lacks them, but there are tools to generate js bindings from those same .d.ts files. https://github.com/jirkadanek/definitely_typed I haven't used it though, so I can't say if it works as advertised.
> I'd say they replaced it with a better tool, pub. Right but that route ends in forcing people to leap to a whole different ecosystem before they can even try your thing. Whereas with typescript you could put a single .ts file in your existing project without messing with anything else.
Re: If TypeScript is so great, how come all notable ReactJS projects use Babel?
#120Edit: Misleading charts, figures and conclusions ahead, see @nathancahill's reply https://npm-stat.com/charts.html?package=babel&package=types... Babel has faltered since the V6 release, TypeScript is still growing fast, so I'd expect the React world to follow suite, even if Facebook itself pushes Flow... NPM downloads in August (rounded): typescript: 2,000,000 babel: 620,000 (down from 890,000 in November 2015) flow…
Well, the V6 release made babel modular, so the babel package is no longer the right one to compare against. Look at babel-runtime: 4,600,000 or babel-core: 4,300,000 vs typescript: 2,100,000.