◄►
Home

Ecma Six Sucks

ECMAScript 2015 / ES6 Interferons

I'm a little late in reviewing the latest version of the language that cannot settle on a name. I took one look, cried ugh!, and carried on typing in good old JavaScript 1.5

But now I find myself encountering libraries written the new right way and discovering all the new features.
Most of the new methods already existed, but can now be written using an entirely new syntax. Great for seasoned devs, but what about newbies?
You can use let and const instead of var. These are useful, and as close to type safety as I like to get.
Other keywords also allow you to do things you can already do! class, super, static, constructor...
But the ugly "use strict"? require("strict") would be so much more tidy.
There's a library called Babel which emulates the new features. Doesn't that prove they were mostly redundant? It is an appropriately named library, in the biblical sense, given the divergence happening right now in JS.
Now this weird new iterator, called generator function*s. They use the keyword yield to get a value and done state... wait, shall I bother explaining the syntax to folks looking to learn the world's most accessible language? You can just use regular objects with callbacks. They are only hell if you cannot design software.
So why did they cram Promises and other half-baked shit in there - to make life a nightmare for noobs? It's bad enough having to keep tabs on all the divergent (and often poorly-designed) frameworks! Whoever sits on the EMCA board must gain from complexity. The lone coder and the small team do not. Nor the JavaScript engine writer, browser vendors, or any of the contractors who'll be doing the soulless overpaid shit-shovelling of the mess this creates.
There wasn't much I wanted to see:
Destructuring, lexical scoping, multi-line strings - great. After 20 years of function I'd love that to be shortened to fun... hey, I can dream.
But for loops were barely improved - Swift did this right.
RegExp y and u flags? Good, but what about the goddamn s flag??

ECMAScript is a fracking bloody mess. Too much Committee Driven Design has turned it from the most welcoming language into the most bewildering. Well done ECMA - you sick fucks made six suck.
How about let's just call it JavaScript, take one step/version back, conservatively ponder Perl 6, the R in RISC, and go from there.