4 ms·
> As a browser-embedded scripting engine, don't-break-the-web selection pressure would have forked and stunted early Python or any other language about as badly
by lmm 12y ago
> As a browser-embedded scripting engine, don't-break-the-web selection pressure would have forked and stunted early Python or any other language about as badly as JS, ignoring the spurious (to what I wrote) "Blub was a better language to start from" benefit.
All (successful) languages ossify sooner or later - just look at how long promised Java improvements are taking to arrive. Python 3.4 is recognizably the same language as Python 1.3, and still suited for much the same problems; it's never going to be Perl or OCaml, even with that ability to make backwards-incompatible changes that JS doesn't have. Where you start from matters.
> Netscape management insisted on "make it look like Java", and time pressure combined with "don't be too big a sidekick" angst from Sun kept such things as classes out of JS in the early days (it took till ES6 to add classes).
Exactly! A language that was designed to not be a replacement for Java for serious, large-scale programming programming, turns out to... not be a replacement for Java for serious, large-scale programming, surprise. No-one is denying (I hope) that JS is a very good language within the constraints it was designed for. But today's use cases are very different from making the monkey dance; the things we're writing in JS today are much closer to the things we were writing in Java 10 years ago than they are to the things we were writing in JS 10 years ago.
JS's unsuitability for certain problems is a result of design decisions, not any "stagnation"; no amount of active development (as welcome as it is) is going to make language X into language Y, and no language can be all things to all people. With the browser becoming more and more of an OS, requiring all web programs to be written in the same language is as wrong as requiring all non-web programs to be written in the same language.
> How about you write the patch and submit it, with tests, and then talk to Mozilla or any other open source browser project.
Wait, Mozilla would accept my patches? Of course Mozilla should allocate their own engineering effort as they see fit (we may disagree about specifics). But my understanding, and the part I took issue with, was that Mozilla was refusing to ever embed Dart as a matter of policy.
- BrendanEich 12y agoYou're still changing the subject, and now moving the goal posts. I didn't have Python 3.4, or 2.5, to start from in 1995. I had 1.3, and it wasn't possible for other reasons. Are you really arguing that, in the far-away-in-the-multiverse world where it didn't have to look like Java, I had time to make a safe, FFI-free subset, etc. etc., Python 1.3 in Netscape 2 would have evolved any faster than JS did? ES1: 1997 ES2, just the ISO version of ES1, pro-forma changes: 1998 ES3: 1999 ES4: mothballed in 2008 ES5: 2009 We had to restart browser competition with Firefox even to get a crack at updating ES3. Competition drives standardization; the IE monopoly stagnation mattered. Most of the rest of your post is flogging "Blub is better". No one agrees on Blub, and there's no way to replace JS with it. Meanwhile, JS is evolving, not just ES6 but ES7/2016 and beyond. Betting against evolution on the Web is risky, in my view. I don't think you're being serious about the work to develop a multi-language-runtime embedding framework. It would not be one patch. You'd have to solve the write barrier cost implied by cycle collection among heaps (see Filip Pizlo of Apple on webkit-dev, I cited this already): https://lists.webkit.org/pipermail/webkit-dev/2011-December/018811.html https://lists.webkit.org/pipermail/webkit-dev/2011-December/... I never refused "as a matter of policy" to embed Dart. Excuses for not working on the real and complex problems with multi-language-runtime VMs are one thing -- making stuff up is another.
- lmm 12y ago> Are you really arguing that, in the far-away-in-the-multiverse world where it didn't have to look like Java, I had time to make a safe, FFI-free subset, etc. etc., Python 1.3 in Netscape 2 would have evolved any faster than JS did? No. I'm arguing that assuming it evolved at the same rate as JS, "ECMA-safe-FFI-free-Python-1.3 5" would be a substantially better language for writing today's web applications in than ES5 is. I repeat: stagnation isn't the problem with JS, fundamental design (a product of the constraints you were working under at the time) is. > Most of the rest of your post is flogging "Blub is better". No one agrees on Blub, and there's no way to replace JS with it. Status quo and sunk costs. No-one can agree exactly which of A, B or C would be best, so we won't do any of them, even though either of A, B or C would give us something better than what we have now. Seriously, every serious proposal I've heard - Python, Dart, LLVM bytecode - is one that I'd take over JS. > Betting against evolution on the Web is risky, in my view. XHTML2 was evolution. <audio> and <video> weren't (an evolutionary approach would have been to specialize or adapt <object>). Web history has its share of successful radical new solutions and failed incremental ones as well as vice versa. > I never refused "as a matter of policy" to embed Dart. That's what matters here. Seriously, I'm really glad to hear that; it's not what I'd understood from the public statements and reporting.
- BrendanEich 12y agoHolding to as brief a reply as possible given short time to write it (apologies to Blaise Pascal): * Python 1.3, stripped of most of its C extensions, may have been substantially better than JS1, I grant -- that was your digression and straw-man, not the point of the text to which you replied. I do dispute that a forked-and-stripped Python 1.3, slowly evolved thereafter, would be materially better than what JS became. Just consider whitespace-based indentation vs. minification, for one issue. * I'm very well acquainted with the sunk-cost fallacy. But that is not why JS endures. JS endures because given the scale of the Web and the consequent backward-compatibility imperative for browsers, the switching cost is extremely high for web developers and browser hackers. The cost of adding a 2nd runtime faced by browser hackers is also high (but less high). Most important, the conserved evolutionary-kernel of JS is "good enough" (worse is better, look it up -- sorry about the warts but not sorry, we have to deal with the world as it is). Therefore no browser (not even Chrome yet) has both the means and the motivation to invest lots of megabucks in engineering high-performance, multiple language runtime tenants sharing the DOM and the rest of the browser APIs. Compile to JS sucks away the oxygen from any such boondoggle. There are multiple Python-to-JS compilers out there. With modern JS (both language and VM-level optimizations), you can get higher fidelity Python this way than you would have by forking and freezing Python 1.3. * XHTML2 was revolution, not evolution. It proposed to replace HTML on the web, not even interoperating well with HTML via the DOM, before we founded the WHATWG and did HTML5. HTML was originally an SGML fork that, as it evolved, bent or violated lots of SGML rules in favor of flat vocabulary, ad-hoc error correction, implicit content models (I perpetrated implicit CDATA for <script>), and worse-is-better. XHTML would yellow-screen-of-death if it didn't validate, and because IE loading the most popular MIME type would error-correct as HTML, even hard-core XML purists would commit errors to published content, unaware. This plus the better-is-better overhead and complexity of authoring XHTML (XML namespaces in particular) led to ~0 adoption. * On me vs. Dart, as on your assertion that multiple runtime integration is much less complex than unstated Mozilla work, you have yet to cite sources. I'm bored by such cheap shots, so will wrap up here with a few thoughts about Dart and its opportunity costs. Feel free to have last words. If you care to read my past HN comments, I railed against the Google "Dash" memo for being two-faced about "we <3 JS; we must REPLACE JS", about the latent and very large conflict of interest for Google as self-congratulatory standards bearer: investing in Dart at the expense of JS. Indeed Google has probably sunk tens of millions into Dart with very little to show for it. Elsewhere here, you asked or assumed that Google uses Dart in its web properties. Does it? So far, I hear it does not, and I've asked Googlers. You should not assume. UPDATE via twitter, thanks to @rightisleft -- some Google services use Dart now: https://www.dartlang.org/community/who-uses-dart.html https://www.dartlang.org/community/who-uses-dart.html This means dart2js, which means Google should've already helped get bignums into ES6 :-|. END UPDATE LOL Dart cost Google some V8 competitiveness, vs. other engines. The whole Aarhus team (except for moonlighters) switched to Dart; a new V8 team had to be recruited in Munich. You could say it's Google's choice on how to invest, and of course I agree, just considering business ethics. But not for "Google the good" as standards bearer. There, the effect on JS standardization and real progress vs. the feared/hated mobile native stacks' languages (C++, ObjC on iOS) -- by such evolutions as asm.js/WebGL for games, and something like SoundScript for larger hand-coded apps -- was significantly delayed. Big companies can work for and against the grain of the web. Elsewhere on this thread, a commenter replied to me about how ActiveX went against the grain (very true). Stuff like NaCl, Pepper, and Dart run the same wrong way, at first and even in the long run -- whether open source (open-washing a project dominated and controled by paid contributors is a hazard, even at Mozilla) or even de-jure standardized (Ecma is pay-to-play). The only way they'd get into other browsers is via market power of the 95% monopoly share kind that IE enjoyed around 2002. Anyway, that's why I railed against the "Dash" memo. The delay in reconstituting the V8 team, and in coming up with something like SoundScript instead of Dart, is relevant to this current thread. If the topic of what's both practical to evolve from JS, and better for developers over against compile-to-JS approaches, is worth arguing about, then I'll argue that Google let the world down by doing Dart. Evolution delayed, but not denied, still hurts. I'm glad to see the new V8 team proposing experiments like this one.
- BrendanEich 12y agoIBM Research did a multi-VM framework a while back, to host both the CLR (.NET) and the JVM, with an inter-heap cycle collector. I think it was called Parlay, but that name seems to have been reused. Highly non-trivial! EDIT: Aha, "Parley": http://hirzels.com/martin/papers/vee04-parley.pdf http://hirzels.com/martin/papers/vee04-parley.pdf You previously asserted that Mozilla spends more on other non-standard-track work than it would cost to support multiple language runtimes. Where is your evidence? I cited mine with PyXPCOM. We did the work to support Python alongside JS. It was neither simple in any sense compared to other work (Mozilla does standards-track-only work; this sometimes leads to dead ends, but that's life) nor a good sunk cost. I'm not here to chinwag with Monday-morning-the-next-decade quarterbacks. First, advert to the complexity you denied up-thread. Then figure out design problems and solutions. If after a ton of work "on spec", you end up writing good patches, I'll help champion them in. I would like to see a zero-cost cycle collection solution. That's research, not patch-hacking. If you can't acknowledge the problems starting with cycle collection, you're not for real.