6 ms·
I picked up The Selfish Gene because I was hoping to figure out how JavaScript got so popular.
by orblivion 6y ago
I picked up The Selfish Gene because I was hoping to figure out how JavaScript got so popular.
- swirepe 6y agoAny insights?
- wizzwizz4 6y agoProbably not. JavaScript's so popular because the web is the universal cross-platform target, and Node.JS has a slightly lower barrier-to-entry to Hello World than learning a new language. You'll want to study energetics to understand that.
- orblivion 6y agoOnly about a third of the way through, but I've picked up some great insights in general. Nothing about JavaScript (yet).
- webmaven 6y ago> Only about a third of the way through, but I've picked up some great insights in general. Nothing about JavaScript (yet). The next book you might want to read looking for the same sort of insights ought to be "The Plausibility of Life", which explores the mechanisms of evolution's generativity.
- Turing_Machine 6y agoIMO, JavaScript became the most popular language in the world because: 1) Everyone with a modern, full-featured browser already has it. There's nothing to install. It's the modern equivalent of the built-in BASIC in the early microcomputers. 2) "View Source" lets you see exactly how something was done at the click of a mouse. This is invaluable for learning. 3) Writing it and debugging it just requires a text editor and the browser mentioned before, not some baroque toolchain. You can even modify it and rerun it from directly within the browser, most of which have fairly sophisticated JS debuggers built in nowadays. 4) Rich text, GUI widgets, networking...all that stuff is already baked into the browser cake. You don't need to fool around with a separate libraries. 5) Interpreted, so iterative development is fast. 6) Forgiving (some would say "sloppy"), so beginners don't get overwhelmed with type systems and similar shizzle ("Why can't I just add 1 and 0.5? WTF?") Of course, this also brings problems along with it. No free lunches. Some other languages, on some platforms, have some of these features, but none to my knowledge has all of them. For example, Linux systems do come with C, and do have the source code available, but looking up the line of source that produced exactly what you're seeing on the screen in, say, an X program, is a far more involved process than just right-clicking it and choosing "View Source". Node, in turn, became popular because JavaScript is popular. That's my take, FWIW.
- saagarjha 6y agoSadly, these days JavaScript tends to be compressed and minified and bundled into frameworks that are much harder to peer into…
- tachyonbeam 6y agoIt got so popular because it was the only available language to do web scripting. It's not that complicated. It's easy to "win" when no competition is allowed. You can argue that there's CoffeeScript, etc, but every other language is still a second-class citizen in the web ecosystem. WebAssembly may change that once it's stable and mature enough, though again, you have the problem that the DOM APIs were designed for JavaScript, which will create an impedance mismatch with other languages.
- webmaven 6y ago> WebAssembly may change that once it's stable and mature enough, though again, you have the problem that the DOM APIs were designed for JavaScript, which will create an impedance mismatch with other languages. Although the DOM itself likely isn't going anywhere unless you manage to swap out HTML, an alternate set of APIs might be achievable. That said, the impedance mismatch would have to be particularly painful for a domain targeted by another language for such a set to gain traction.