3 ms·
Explain what the coincidence was ? There are alternatives everywhere (ActiveX, flash, java, visual basic IIRC). And yet here we are, with JS. I believe JS came
by roblabla 10y ago
Explain what the coincidence was ? There are alternatives everywhere (ActiveX, flash, java, visual basic IIRC). And yet here we are, with JS.
I believe JS came here because it actually is the best language we have had in the web. It's so easy to throw shit arround, but let's be honest with ourselves, this isn't purely out of luck.
- danappelxx 10y agoJS won out the web because it came with HTML5, not the other way around.
- deleted 10y ago[deleted]
- recursive 10y agoJS won out the web long before anyone ever heard of HTML5.
- qznc 10y agoJS is the only language integrated into the browser and the DOM. Netscape rejected other languages (Python, Perl, TCL) because of syntax, so Brendan Eich disguised Scheme into Java syntax and hacked up a prototype in 10 days. Today, Javascript is sooo interwoven with the DOM in browsers that it is near impossible to separate them. Google planned to do this for Dart, but gave up. If they had done this and other browser vendors had followed, adding a third and forth and more languages would have been (relatively) easy, because the abstraction were in place. Then we would have seen a healthy competition. There is asm.js. Maybe we will get a "web bytecode" at some point, but that will easily take a decade and more. The pressure is increasing, because our CPUs don't get exponentially more powerful anymore. And delivering apps via the web is still going strong.
- mook 10y agoThere were noon-JS languages on the web, though; in particular, VBScript was a thing in the (at the time) most popular browser. I understand that at one point there was a third-party Perl implementation too. Unfortunately there wasn't a good way for the other browsers to implement it. Or perhaps fortunately, depending on your point of view…
- BrendanEich 10y ago1. WebKit rejected adding barriers to support multiple garbage collectors and a super-GC to collect cycles, required by Dart or any 2nd VM. See https://lists.webkit.org/pipermail/webkit-dev/2011-December/018811.html https://lists.webkit.org/pipermail/webkit-dev/2011-December/... where Fil Pizlo of Apple cites 5% throughput regression. Dart was never going to make it, and adding 3 or 4 VMs with their own GCs is even less plausible. 2. See https://github.com/WebAssembly https://github.com/WebAssembly for progress on what asm.js showed was possible: a 2nd, initially co-expressive with asm.js, eventually more expressive, binary syntax for the Web. It's happening now, this year and probably shipping experimentally in 1Q2017. Writing "easily take a decade" out of ignorance just says to me you didn't even bother to use google!
- BrendanEich 10y agoAnd now: https://news.ycombinator.com/item?id=12838335 https://news.ycombinator.com/item?id=12838335
- ssalazar 10y agoJavaScript beats those out because a.) it integrates with the DOM b.) its the only one that works on every platform today (people seem to forget that before the iPhone, web apps were heavily Flash-based). These features are powerful, but don't necessarily reflect the quality of the language design or development ecosystem.
- niftich 10y agoJS won because it was the only thing that every browser supported from the very beginning, and the various differences in implementation (of which there were many) were eventually shimmable by jQuery and other AJAX frameworks. Everything else was either some alternative only supported by one of the vendors (VBScript, Dart), or a full-blown plugin that had a different model of interaction with the webpage (Java, Shockwave, Flash, Silverlight). It's pretty much the textbook instance of a compromise between vendors of competing interests to further the common web. Despite this, it took a really, really long time -- almost ten years -- for JS to receive additional browser-implemented APIs that brought that platform's capability to what we know today and comparable to that of what we had with plugins -- and still, not every vendor supports every spec yet, making this "open web" no less subject to vendor pressures, despite being 'open' and 'neutral' [1]. [1] https://news.ycombinator.com/item?id=12259827#12259940 https://news.ycombinator.com/item?id=12259827#12259940
- zeveb 10y ago> I believe JS came here because it actually is the best language we have had in the web. It is the only language we have had in the web (modulo some minor experiments). The only reason it's popular in the browser is because it's the only choice at all. The only reason it is used on the server is because some folks are familiar with it from using (overusing IMHO, but that's a different rant) it in the browser and are not familiar with the advantages of using any other language. I've written this before, but sometimes in my most morose moment I like to imagine what the world might have been like had Brendan Eich been permitted to implement a Scheme instead. And I don't even like Scheme!