MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/30hyan/airbnb_javascript_style_guide_a_mostly_reasonable/cpu24re/?context=3
r/javascript • u/mrkipling • Mar 27 '15
158 comments sorted by
View all comments
Show parent comments
1
IE8 has no .bind();
.bind();
1 u/wdpttt Mar 28 '15 Not a reason... http://stackoverflow.com/questions/11054511/how-to-handle-lack-of-javascript-object-bind-method-in-ie-8 0 u/cresquin Mar 28 '15 Polyfills are hacks that add weight to the page, not good solutions. They also make code less portable since they require a compatibility layer. I can see why they would want to avoid them. 1 u/wdpttt Mar 29 '15 Polyfills are hacks that add weight to the page, not good solutionsJust like every other code in your app...They also make code less portable since they require a compatibility layer.Hum? Less portable? If I Polyfills it runs on more browsers... I don't get it.I can see why they would want to avoid them.I would use them. So your code for forEachwould still be _.forEach(array, fn) instead of array.forEach(fn)? I prefer the 2nd, because:Most of the users has recent browser which already have forEach;If they don't you make the polyfill; It runs a little bit slower, but it's the same as _.forEach(array, fn);
Not a reason... http://stackoverflow.com/questions/11054511/how-to-handle-lack-of-javascript-object-bind-method-in-ie-8
0 u/cresquin Mar 28 '15 Polyfills are hacks that add weight to the page, not good solutions. They also make code less portable since they require a compatibility layer. I can see why they would want to avoid them. 1 u/wdpttt Mar 29 '15 Polyfills are hacks that add weight to the page, not good solutionsJust like every other code in your app...They also make code less portable since they require a compatibility layer.Hum? Less portable? If I Polyfills it runs on more browsers... I don't get it.I can see why they would want to avoid them.I would use them. So your code for forEachwould still be _.forEach(array, fn) instead of array.forEach(fn)? I prefer the 2nd, because:Most of the users has recent browser which already have forEach;If they don't you make the polyfill; It runs a little bit slower, but it's the same as _.forEach(array, fn);
0
Polyfills are hacks that add weight to the page, not good solutions. They also make code less portable since they require a compatibility layer. I can see why they would want to avoid them.
1 u/wdpttt Mar 29 '15 Polyfills are hacks that add weight to the page, not good solutionsJust like every other code in your app...They also make code less portable since they require a compatibility layer.Hum? Less portable? If I Polyfills it runs on more browsers... I don't get it.I can see why they would want to avoid them.I would use them. So your code for forEachwould still be _.forEach(array, fn) instead of array.forEach(fn)? I prefer the 2nd, because:Most of the users has recent browser which already have forEach;If they don't you make the polyfill; It runs a little bit slower, but it's the same as _.forEach(array, fn);
Polyfills are hacks that add weight to the page, not good solutions
Just like every other code in your app...
They also make code less portable since they require a compatibility layer.
Hum? Less portable? If I Polyfills it runs on more browsers... I don't get it.
I can see why they would want to avoid them.
I would use them. So your code for forEachwould still be _.forEach(array, fn) instead of array.forEach(fn)? I prefer the 2nd, because:
forEach
_.forEach(array, fn)
array.forEach(fn)
Most of the users has recent browser which already have forEach;
If they don't you make the polyfill; It runs a little bit slower, but it's the same as _.forEach(array, fn);
1
u/cresquin Mar 28 '15
IE8 has no
.bind();