5 ms·
So in looking at the Kangax tables when the next Safari comes out, it looks like all major desktop browsers will have support of the big ticket ES6 features (ar
by grayrest 10y ago
So in looking at the Kangax tables when the next Safari comes out, it looks like all major desktop browsers will have support of the big ticket ES6 features (arrow functions, destructuring, default params, Map/Set/WeakMap, Proxies). Unless you're doing JSX, type annotations, or upcoming stuff (async/await, decorators, object spread, class properties) you can drop transpiling from your dev workflow and only do it for prod.
- zghst 10y agoWell, not completely, other devs who are working on the same project might not enjoy debugging why X isn't working on a certain browser.
- jay_kyburz 10y agoI thought IE11 and earlier have none of these features right? And you can't run Edge on windows 7 right? And aren't more than 50% of windows sill Windows 7? And in't windows still 90% of the market? I was thinking these features are still 5+ years away unless you are prepared to actually ask your users to switch to Chrome.
- callahad 10y agoTransformation of most ES6 features into functionally identical, backwards-compatible ES5 is trivial, and automated tools exist to do that, so you absolutely can use them today. For example, default arguments are purely syntactic sugar for `if (arg === undefined) { arg = x; }` in the first line of a function. Still, I'd much rather write ES6's declarative `function foo(arg=x) { }` syntax rather than imperatively implement it in ES5 each time I need it.
- jay_kyburz 10y agoAbsolutely agree, I was just confused by "all major desktop browsers will have support of the big ticket ES6 features" but I didn't think IE10 or 11 were getting any of these features.
- zeckalpha 10y ago> I need it. Need is a strong word.
- callahad 10y agoIn this case, "need" refers to the "if (x === undefined) { x = y }" pattern. Which is absolutely a need when implementing functions with variable arity. If I need that pattern, I'd rather write it declaratively than imperatively. :)
- zeckalpha 10y agoVariable arity is exactly the thing to which I refer. It isn't needed.
- jwalden 10y agoTechnically, default arguments don't <em>quite</em>, <em>purely</em>, desugar exactly into that -- there are some scoping complexities to them as well (possibly only for functions having strict mode code), the details of which I haven't fully internalized. Your observation is otherwise correct with a little bit of handwaving. :-)
- elmigranto 10y ago> windows still 90% of the market Of all the people on the web, or target audience of your website, or what market?
- jay_kyburz 10y agoI just checked my own stats. Chrome 62%, Safari 18.5, Firefox 10% Internet Explorer 3%