4 ms·
Imagine being a naturalist and observing this behavior in the wild: "Wow, these developers have a really fertile experimental ecosystem. Why are they doing thi
by habitue 11y ago
Imagine being a naturalist and observing this behavior in the wild:
"Wow, these developers have a really fertile experimental ecosystem. Why are they doing this? It looks like they're reinventing things over and over again. It looks like they are doing some things worse (than I would) on purpose! What puzzling behavior! Perhaps there are some interesting incentives causing them to do this... Perhaps there are good things that result from this behavior... Hmm let me think about it. They must be very strong reasons if so many developers are engaging in this curious behavior."
Now imagine the author in the field:
"Just grow hands and pick that thing up you dumb birds!" (JavaScript has an anemic standard library)
"Why are you all trying to break an acorn open in different ways? Standardize on something you idiots!" (If there were one true way that instantly convinced everyone, the variety in library design would go down.)
JavaScript development has a lot more to do with path dependence than perhaps other more modern languages do. The language itself doesn't constrain your strategies in the way, say, Java does. You can create object/class hierarchies, or you can use closures to encapsulate private state.
You can use jQuery to manipulate the exact piece of the DOM you're interested in, but maybe different oarts of your code clobber each other's changes. Or you can use virtual DOM techniques to create the DOM you want in one go, but spend more cpu generating a diff.
You can use grunt which is purpose built for assembling js projects, but requires learning a big configuration language. Or you can use gulp which is "just JavaScript" but is more complicated to configure.
My point is that the JavaScript ecosystem doesn't have all the answers yet, and they're looking for them. Closures, prototypical-inheritance, async io... this language is pretty unique and there isn't a template to go off of. (What other language has a DOM? What the hell is that?) Every time someone just attempts to emulate another language's solution, inevitably they leave better solutions on the table by ignoring what JavaScript is capable of.
- EvanPlaice 11y agoA monolithic standard library would be ideal in a utopia where nothing changes over time. Unfortunately, the reality is much different. New technologies, new approaches, new constraints are introduced all the time. Monolithic architectures grow to the point where they eventually collapse under their own technical debt. Unless, there is a very active core of mai tainers that aggressively deprecate old APIs over time. Javascript doesn't try to be the end-all be-all solution. Ot provides an blank slate and a decent set of standard tooling for devs to build and compose modular components. Sure, the degree of experimentation can get ridiculous at times but nobody is forcing you to use the latest/greatest modules/libraries. Nobody is forcing you to transpile to ES/Typescript/Clojure. You can totally get away with creating static table based layouts in FrontPage if you want. Except, the devs using all those fancy new tools will be running laps around you and producing. 100x the output. There's no doubt that JS could use a better foundation as a language and much of it is coming in ES6/7. Managing complexity won't be so difficult once the module loader standard is available. JSPM already provides a leek into the future. It's kind of ironic that you use a naturalist as an example. If nature followed a centralized monolithic design approach (ie intelligent design) rather than natural evolution, Earth's atmosphere would still be nitrogen based and we wouldn't exist to axe grind over the minutiae of programming. In fact, I'd argue that monolithic design has had great success in spite of resource scarcity because Moore's law hadn't reached a ceiling yet.