7 ms·
I've been away from JS for about 10 months and... cool, but, fuck, that changed quickly. Time to get caught back up to speed. Is ES6 now actually viable, in tha
by peter_l_downs 11y ago
I've been away from JS for about 10 months and... cool, but, fuck, that changed quickly. Time to get caught back up to speed. Is ES6 now actually viable, in that it's supported by most users' browsers? If not, are there popular compilers for ES5?
- deleted 11y ago[deleted]
- serve_yay 11y ago"Everyone" is using Babel now. A lot of ES6 features are making their way into browsers and node, but there's so much variation that a transpile step is needed. Babel is nice but currently quite slow. Babel has a REPL you can play with here: http://babeljs.io/repl/#?experimental=true&evaluate=true&loose=false&spec=false&code= http://babeljs.io/repl/#?experimental=true&evaluate=true&loo...
- pjmlp 11y agoIn this side of the galaxy still looks like JSF with RichFaces and ASP.NET WebForms.
- eltaco 11y agoThere's currently a issue for "speed": https://github.com/babel/babel/issues/1486 https://github.com/babel/babel/issues/1486. Looks like it complied ember core from 50s to 18s now.
- serve_yay 11y agoYep, saw that. I don't think it's enough of an issue to not use Babel (my team uses it and we all think it's great), but it is suboptimal.
- unoti 11y agoWhoa, thanks for introducing me to Babel. It looks like user plugins could be wildly, astonishingly powerful for doing compile-time code execution.
- girvo 11y agoCorrect. One of my favourite at the moment is `babel-plugin-rewire`, which is a neat replacement for `rewire` -- allowing easy unit testing in full isolation by hijacking the `import` statements :) [0] https://www.npmjs.com/package/babel-plugin-rewire https://www.npmjs.com/package/babel-plugin-rewire [1] https://www.npmjs.com/package/rewire https://www.npmjs.com/package/rewire
- Lazare 11y agoJust started using that yesterday, and it's lovely.
- altano 11y agoTo answer your browser compatibility question: https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/
- deleted 11y ago[deleted]
- Keats 11y agoYou can use Typescript as well for an alternative to Babel, it doesn't have all the features Babel has (like async/await) but they are planned. And you get types at the same time.