4 ms·
I'm getting really tired of this "it has massive adoption" trope. Let's be clear about it, the merits of the language have nothing to do with its adoption. It'
by VeejayRampay 13y ago
I'm getting really tired of this "it has massive adoption" trope.
Let's be clear about it, the merits of the language have nothing to do with its adoption. It's widely adopted because Javascript has a stranglehold on the browsers and people don't have a choice. Nowhere in the software space would such a monopolistic position be acceptable, but hey on the web for some reason it's OK.
So yeah, it's the dominant language but not because it's oh so good or because people think it's awesome (though some of them do and I respect that), it's only because there's absolutely no alternatives.
- cbsmith 13y ago> Let's be clear about it, the merits of the language have nothing to do with its adoption. Having a platform that is already out there and which you can execute against without even an install might not prove much more about the merits of a language, but it is a merit in its own right. Of course, in this particular case... JavaScript isn't exactly widely deployed in hardware, and this device is what provides the platform so... yeah. > It's widely adopted because Javascript has a stranglehold on the browsers and people don't have a choice. That's not entirely true. People have had lots of choices. There was Java. There was Flash. There was even VBScript on IE (I bet you didn't know that), not to mention all the EMScripten fun that is now available. Time and again, people choose JavaScript if for no other reason than for its lowest common denominator qualities. > Nowhere in the software space would such a monopolistic position be acceptable, but hey on the web for some reason it's OK. If you consider the list of widely used languages for which there is an approved standard by an independent standards body and multiple independent implementations, you end up with a surprisingly short list (and some qualify but by the skin of their teeth). I think, sadly, this is actually quite widely accepted.
- VeejayRampay 13y agoCome on. VBScript and Flash? Really? What I meant and you pretend to not understand is that there is no way to use another language just like you use Javascript when scripting a web application. I can't open a console and go @document.query_selector_all(".fancy").each do |element| ... end I find that annoying. That a few companies have tried to introduce proprietary extensions is another topic, it doesn't mean that there is a real choice for developers. The point is that some people decided some time ago that scripting the web and accessing everything browser-ish (DOM, Canvas, SVG, WebSockets, Web Workers, etc.) meant Javascript and that was it. The lack of choice and variety at hand is absolutely ridiculous. In no other software space would people tolerate to be forced into a technology like that.
- cbsmith 13y ago> That a few companies have tried to introduce proprietary extensions is another topic, it doesn't mean that there is a real choice for developers. I spoke in the past tense because those were choices available to developers... JavaScript seems to have won out as a preferred choice. EMScripten opens up a lot of possibilities though... > In no other software space would people tolerate to be forced into a technology like that. I think history would beg to disagree.
- annasaru 13y agoGood arguments. We had silverlight, and Adobe Air / Flex that may or may not have been trying to displace JS - but they were ways to program in the Browser. Sure they were put forward as solutions by companies that had an agenda. Such a language also is dependent on HTML-standards. We should see interpreters for other languages written in JS - or is that far fetched?
- auvrw 13y ago> We should see interpreters for other languages written in JS - or is that far fetched? there is a scheme interpreter, of course. someone compiled cpython to javascript using llvm and posted results a few weeks ago. too lazy to find links
- asdasf 13y agoActing like java or flash are or ever were alternatives to javascript is displaying a very profound ignorance of what javascript is for. How do I manipulate the DOM in java? Oh I don't? It is not an alternative option then. Javascript absolutely is the only option, and people have no choice. That is why people invest so much time in writing LANGUAGE_X to javascript compilers, so they can write code in a less terrible language even though it has to be deployed as javascript.
- b0rsuk 13y agoThis is a good point. It reminds me of SQL. ORMs are everywhere and everyone is trying hard not to write any SQL.
- cbsmith 13y ago> How do I manipulate the DOM in java? That's kind of Applet's 101: http://docs.oracle.com/javase/tutorial/deployment/applet/manipulatingDOMFromApplet.html http://docs.oracle.com/javase/tutorial/deployment/applet/man... Flash has similar (arguably much better) API's for this as well. There are graveyards filled with other attempts. > Javascript absolutely is the only option, and people have no choice. Being the most broadly supported and most integrated solution doesn't mean developers have no choices. It just means they JavaScript might be their best choice. On almost any platform there are going to be certain programming languages that are more integrated and better supported. > That is why people invest so much time in writing LANGUAGE_X to javascript compilers, so they can write code in a less terrible language even though it has to be deployed as javascript. And there you have it. JavaScript wins by virtue of being a better deployment platform in the browser space. At one time Java used to enjoy an even broader advantage. Acrobat, Flash, VBA, Bourne Shell, MSI, Unix DBM, SQL, sendmail, PHP, MySQL, Windows, Linux, C, POSIX, PostScript, XWindows, etc. have all ridden these kinds of waves. Some are more successful than others, and certainly the web browser is probably the most ubiquitously deployed runtime environment ever, but really, if anything this is normal and the broad diversity is not. It's not unfair or unusual, so much as inevitable.
- asdasf 13y ago>That's kind of Applet's 101 So, write javascript to trigger a java applet that changes the dom is a reasonable alternative to writing javascript to change the dom? >Being the most broadly supported and most integrated solution doesn't mean developers have no choices Yes, it literally does. When presented with one option, you have no choice. >And there you have it. JavaScript wins by virtue of being a better deployment platform in the browser space Are you serious? >It's not unfair or unusual Nobody said it was. Just that javascript sucks and we're stuck with it against our will.