On Nov 4, 2010, at 12:04 PM, Nathan Stott wrote: > In most languages it's great to innovate on them. In JS the equation > is not the same. In JS, any innovation won't be usable for 5+ years, > optimistically, because it will take that long for IEs that don't > support it to fade to a low enough percentage of use.
I'm not sure (sorry if my usage of it was unclear) what you mean by "innovate on them". When I wrote: > It's great to innovate on the language. It's a terrible idea to make this the > only possible future of the language, with only syntactic improvements. I meant "innovate on top of the existing language, using only what its kernel semantics (and any APIs in the relevant embedding) can express." That is not fine for evolving the language into the future, not by our lights in TC39, nor by anyone looking at the big picture and the long haul. If you took that view in 1994, there would be no JS. In 1995, there would be no ES2 or ES3. The web does evolve, including in the kernel semantics of its core languages. TC39 is looking out for the big picture and the long haul, as best we can. As for "five years", that's not true historically, and it need not be true going forward. IE4 added ES3-like regexps and sites used them, because Netscape 4 had them too. IE4 did not add try/catch/finally, however, and that was held back for more than five years. It all depends on what browser vendors do to innovate and upgrade their installed bases. Some IE6 and IE8 (the new IE6?) problems do stick. But they haven't prevented continuing evolution, and developers are either shunning IE6 or targeting it with no-JS or less-JS content. This costs but it's not insuperable. For Harmony extensions, we in TC39 (including all the major browser vendors save Opera) are prototyping before we standardize. Same as was done, of necessity outside of TC39 and without Microsoft, in the bad old days, when we (Mozilla) added getters and setters. All it took was live.com launching in 2005 with its "Atlas" JS library assuming if (!document.all) that getters and setters were present, and pretty quickly (five months, more like -- not five years) Safari and Opera supported getters and setters too. Beyond extensions being prototyped and user-tested, and therefore becoming available in leading-edge browser releases, people are developing translation tools. These aren't free lunches either but they beat writing code twice. And in the long run, however many years it may take assuming browser vendors cooperate in TC39 and continue to work on Chrome-style always-up-to-date user upgrades, we will reach a point, as we did with ES3 and the modern "JS" dialect interoperably implemented, where the new features are there in almost all browsers hitting your server. ES5 is rolling out now. It won't show up on Windows XP in IE8 of course, unless Microsoft backports Chakra. But all the other four top browser vendors support XP in their current releases, AFAIK. None of this is perfect, but it is not all as bad as five years minimum. It's also no reason not to evolve the language. To be very concrete about the modules topic, mapping Harmony modules to ES3 or ES5 is doable without using an async dynamic-loading API, by pre-processing and prefetching dependencies before the scirpt in which the out-of-line module declarations lie is evaluated. This is what Caja, et al, do today. /be > > > On Thu, Nov 4, 2010 at 1:36 PM, Brendan Eich <[email protected]> wrote: >> On Nov 4, 2010, at 11:32 AM, Brendan Eich wrote: >> >>> This Harmony script: >>> >>> <script type="harmony"> >>> var invariant = 99; >>> module Foo = "foo"; >>> import Foo.bar; >>> bar(invariant); >>> </script> >>> >>> is not equivalent to anything like this: >>> >>> <script> >>> var invariant = 99; >>> requestModule("foo", function (Foo) { >>> Foo.bar(invariant); >>> }); >>> </script> >>> >>> because invariant could be varied by a later script or event handler. >>> >>> This is precisely what I mean by "not possibly in the language currently". >> >> Never mind the lack of TCP inherent in desugaring using function (no, we >> aren't adding Tennent-preserving lambdas). >> >> I suggest not making cargo-cult idols of "what can be done in the language >> currently". It's great to innovate on the language. It's a terrible idea to >> make this the only possible future of the language, with only syntactic >> improvements. >> >> The idol seems to have wings and a propeller, but it is made of palm fronds >> and it will not fly. >> >> /be >> _______________________________________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

