3 ms·
The author has huge gaps in his understanding the language works, and these tools work, and he seems to have zero interest in correcting that. It sucks that he
by underwater 9y ago
The author has huge gaps in his understanding the language works, and these tools work, and he seems to have zero interest in correcting that. It sucks that he had a bad experience. And, yes, it's a lot to understand. But he blames Babel, the authors of polyfill code, and Twitter without putting any attempt into filling the gaps in his understanding.
The Babel homepage literally says what it does.
> These plugins allow you to use new syntax, right now without waiting for browser support.
When a Twitter user tried to help him by asking how a syntax transform could polyfill `forEach` on a `NodeList` -- something that would be impossible in JS -- he was completely dismissive.
> Science? ️ I dunno. Maybe if the object was previously queryselected? [...] I'm way past that problem now.
Polyfills can be heavy because they have to be forward compatible and implement behavior to spec. If they don't then you end up shipping code that breaks when browsers are updates and the polyfill becomes redundant. That's how you break the web.