5 ms·
https://twitter.com/domenic/status/721796970197684224 https://twitter.com/domenic/status/721796970197684224
by moretti 11y ago
https://twitter.com/domenic/status/721796970197684224 https://twitter.com/domenic/status/721796970197684224
- dchest 11y ago"Bublé is so funny. Remember Babel started out as "Traceur output is too complex!" Over time they learned that being spec-compliant matters." — Domenic Denicola (@dominic, Editor of the @htmlstandard and @streamstandard. Works on @googlechrome.)
- sp332 11y ago(Continued) "Now the cycle begins anew, with a "lightweight" ES transpiler that generates output with oversimplified, wrong semantics."
- Dylan16807 11y agoThat seems like a biased description. Being lightweight doesn't seem to be a goal. The goal is having a very clear function with no configuration, and being simpler is just for brownie points.
- Touche 11y agoWait, so JSX is part of the ES spec? Oh, it's not. I really wish people called it BabelScript. It's annoying to constantly have to fight the (incorrect) assumption that "it works in Babel" === it's ES.
- spicyj 11y agoBabel 6 doesn't support JSX (or really, anything) by default; you need a plugin. The es2015 preset is what's in ES2015.
- Touche 11y agoThen it's worthless to say "Babel is spec compliant" when it is just compiler infrastructure and not a compiler. It can be as spec compliant (or not) as you want.
- spicyj 11y agobabel-preset-es2015 is as canonical a "default configuration" as you're likely to find.
- Touche 11y agoDoes it enforce you putting `.js` on import strings? It should.
- tracker1 11y agoWhy would it.. babel doesn't do any actual import/export modification. It doesn't have a module/bundler built in... that's what webpack, browserify and the like are for.. and no, they don't require the .js, but you can still use it.
- Touche 11y agoRight, but the argument for being spec compliant is that some day you can simply stop using the transpiler and your code should not break. So, the correct spec-compliant thing to do would be for the ES2015 preset not to touch import/export and let the bundler handle that (hopefully correct). Compiling to CommonJS, which doesn't care about `.js` or not, is the wrong choice.
- rich_harris 11y agoMy reply to Domenic's comments https://twitter.com/rich_harris/status/721830364776415232 https://twitter.com/rich_harris/status/721830364776415232
- mstade 11y agoYour goals are worthwhile. I recently built a tool not unlike yours, sharing many of the same goals vis-à-vis ease of use. Unfortunately it's currently closed source, but hopefully it'll be opened up soon and we can compare notes. There is definitely space for tooling which trade flexibility for ease of use. I wouldn't worry too much about Domenic's flame bait anyway, he has a habit of missing the point. (I mean, he did champion JS promises after all..)