3 ms·
The Reasons Behind JavaScript’s Success
- austin-cheney 3y agoThe reasons for the success of JavaScript are C like syntax with the features of Lisp: * functions are first class citizens * native lexical scope * OOP optional That's it, flexibility. Many people want to falsely claim because its the language of the browser or because of something to do with JSON. The rising popularity on a timeline of JavaScript does not support those false conclusions. For example JavaScript was around for more than a decade locked in the browser before it became popular and it was already becoming popular before JSON support was natively available.
- fagnerbrack 3y agoThe whole post argues about a non-technical reason
- kazinator 3y agoThe success of Javascript is entirely due to there being only two languages in which you can program a web page with full control over client behavior: Javascript, or something that translates to Javascript. It could never have survived on its own in the wild. Javascript is not the first scripting language with C like syntax. Before Javascript there was LPC (C-like language for programming LPMud). https://en.wikipedia.org/wiki/LPMud https://en.wikipedia.org/wiki/LPMud And of course the C-like language within Awk where you can write things like: function add(a, b) { return a + b; } LPC was cloned by a GPL-ed language called Pike in the mid 1990's. You don't hear about LPC or Pike today. (Part of the reason for which is probably the rise of Java to prominence in the area of "managed languages that look like C"). Awk is around because it's part of POSIX. It's the only language other than the shell you can count on being there. A Javascript developed as a project not connected to the web would likely receded into obscurity like Pike.
- austin-cheney 3y agoIf that is true then why did it take over a decade to achieve even the most modest of popularity? The web was already popular and JavaScript had long since been available. > It could never have survived on its own in the wild. People continue to say that about Lisp and Haskell. > A Javascript developed as a project not connected to the web would likely receded into obscurity like Pike. That sounds like a logical fallacy. Surely the result would be different had the conditions not been the same, but guessing at a result derived from conditions that never happened is fantasy.