3 ms·
Why is transpiling ES6 any more of a PITA than transpiling Clojurescript? ES6 to ES5 is a one shell command with Babel. And TS is ES6 but with type annotations.
by Wintamute 11y ago
Why is transpiling ES6 any more of a PITA than transpiling Clojurescript? ES6 to ES5 is a one shell command with Babel. And TS is ES6 but with type annotations. And ignore all of the myriad of high quality plain JS modules on npm at your peril. I like Dart and ClojureScript too, but I've really enjoyed working on ES6 and ES5 projects too. I don't doubt your Dart and ClojureScript credentials, but your comment betrays ignorance of ES6 and the plain JS ecosystem.
- moonchrome 11y ago>ES6 to ES5 is a one shell command with Babel. You still need to include core.js to polyfil basically everything from standard library. And then you need to make sure Babel works with your framework (like Polymer or what not), and that's just the start of the interop hell that is using different JS libraries together. Rule of thumb - anything you add to your JS build system = increase in the likelihood of hair pulling when things break - and babel and core.js are two such things. The value I get from ES6 compared to the CLJS change how much I'm willing to tolerate the PITA factor of the build system. In dart I don't have to do any of that, just add few lines to pubspec.yaml with dependencies and transform directives and off I go. And every other library uses the same build system and the same package manager and the same standard library !
- pfooti 11y agoI have not found that to be the case. I run my code through gulp-babel and done. There is no runtime AFAIK, although there was one for traceur. I have also had no real problems interopping with other big libraries. I think the biggest point of discontinuity would be the class keyword vs other class-like libraries (like coffeescript's implementation). Even that's not too bad, I'm able to extend those using es6 class syntax, I just need to be careful about calling super and setting up the constructor properly.