Please Keep JavaScript Dumb
hyperorg.com
hyperorg.com
Enterprise codebases I work on are locked to ES5 and scale to 100k+ lines. These codebases cannot afford to layer on every new JS "innovation" and hope to remain consistent across 7+ years (the average lifespan of an enterprise app) and multiple developers.
To assume that this is just because of developer laziness or inability to learn is to ignore the realities of apps built and deployed behind the firewalls of Fortune 500 companies.
Unnecessary is a matter of taste. Most don't like having to bring out `.bind()` or inside of the function using `let that = this`.
const that = this;
I’m not saying that your 100k loc code bases can’t be built without them. Obviously, once a language is turing complete, then everything is possible. But certain language features tend themselves to create bugs at a higher rate than others because they confound the expectations of even the most experienced developers. Functions are such a feature.
I’m sure your 100k code bass works fine now - but I wonder, if you look through the commit logs, just how many bugs were caused by some of the inconsistencies and strangeness I mentioned above, and I wonder how much of that time and those bugs could have been obviated had you moved. Probably a decent amount.
While for me, the JS language features are still manageable. What has outgrown me are the layers upon layers of abstractions used in modern JS app, like React/Redux/... We no longer have a straightforward, plain JS app. To understand the code, we have to 'see through' the thick layers of frameworkds/middleware.
Modern JS app is becoming as ugly as J2EE last time used to be.
I'm not an expert though.