4 ms·
I second this. I love ES5. It was a beautiful, simple language. And it runs just the same on literally every device. The JavaScript community has taken a horri
by erikpukinskis 9y ago
I second this. I love ES5. It was a beautiful, simple language. And it runs just the same on literally every device.
The JavaScript community has taken a horrible turn towards complexity. I’ve been planning a fork of the npm tree, to return to ES5. But it’s a big project and I want to be ready with a good modern, modular web toolkit before I do.
(The plan is not just to fork an ES5-compatible tree, but to allow people to rewind the npm tree to an arbitrary branch mask based on any linting rule they like and append from there. If you want to narrow to only typescript+react packages with named exports for tree shaking, you could. I’m gonna do good old fashioned ES5 though, no promises allowed and no assignment in global scope)
- thepapanoob 9y agoi understand your love for javascript... but i dont understand the hate for es6 & upwards. ive rewritten all my code to atleast es2015 and lost so much overhead while doing it wich makes my projects alot easier to maintain. (and alot more predictable) the only thing wich is lacking right now is native support for it in the browsers
- erikpukinskis 9y agoPromises introduce declarative control structures basically between every function call in an async application, which is a nightmare for debugging. ES6 introduces way more syntax, making it much harder for beginners to learn. Arrow functions make scope much harder to reason about, which makes closures more of an anti-pattern. In ES6 closures are one of a tiny number of scope patterns so you can actually use them. Arrow functions cause bind to break in unpredictable ways. Most other ES6 features are just syntactic sugar which offer no software engineering benefit and add a whole layer of conflicting code styles that one must constantly switch between, or else deal with constant pointless linting fixes if you are adhering to a consistent standard. ES6 demands you use a transpiler which makes debugging flakier, and adds another place for bugs and maintenance work, in addition to often slowing he build down. If I wanted deal with that much headache I’d just use typescript and at least get type checking in exchange for the syntax change and transpile step. ES6 exists because some programmers never understood prototype and bind. And felt naming a function that is only called once was icky. Mostly former Ruby programmers. So they bolted a shitty Ruby onto JavaScript in order to get people to stop using prototype and bind, which are the heart of JavaScript’s control flow. Basically the chest burster from Alien.