5 ms·
What's the timeline on everyone using ES6 in production and JavaScript developers being expected to know ES6? 2 years?
by gargarplex 12y ago
What's the timeline on everyone using ES6 in production and JavaScript developers being expected to know ES6? 2 years?
- andrewingram 12y agoI'm using a lot of them in production right now, thanks to transpilers. Unfortunately not everything can work without the aid of a run-time, which is how Traceur works. At the moment i'm limiting myself to the features that don't require such a run-time.
- Arnavion 12y agoOff the top of my head, features that are entirely syntactical transformations and don't need a runtime: - Classes (except inheritance requires a tiny shim function) - Destructuring (except destructuring iterators) - Rest parameters - Arrow functions - Shorthand object literals - Computed properties - Template strings (although tagged template strings require a non-trivial amount of shimming to mimic) - let and const (check correctness before transpiling, then compile to var. Transformation is non-trivial when inside loops, etc.) - Modules Features that do require a runtime / library: - Iterators and generators - Promises - Symbols - New ES6 methods on Object, Number, String, etc. (like Number.isNaN)
- andrewingram 12y agoI think to use the more advanced features of modules, ie default exports, you do need a run-time.
- thejameskyle 12y agoThen why not use something like https://6to5.org/ https://6to5.org/ ? Most syntax features can be transpiled without a runtime (generators being an exception) and everything else can simply use polyfills.
- zghst 12y ago18 months - 2 years would be an appropriate time to use ES6 features safely without a transpiler (however we will still be using transpilers in the future for ES7 and ES8). But you can use them today using a transpiler like 6to5 or Traceur.