2 ms·
In point of fact, your first sentence is wrong. I know this because I tried for a better design via JS1.2 in Netscape 4, enabled by opt-in versioning (<script
by BrendanEich 12y ago
In point of fact, your first sentence is wrong.
I know this because I tried for a better design via JS1.2 in Netscape 4, enabled by opt-in versioning (<script type="application/x-javascript; version=1.2">). This was in 1997 while standardizing ECMA-262 Edition 1 (ES1).
And based on this JS1.2 experience (in beta, and it went to final in Netscape 4 when that dog finally released), I argued to the Ecma TC39 TG1 standards group that ES1 should incompatibly change == and != to work as === and !== do in JS today and since ES1.
Microsoft's JScript lead rejected this change as breaking, counterproposed the === and !== operators, and we all agreed. We also rightly decided not to impose opt-in versioning then, or ever after (1JS FTW).
(Irony: in 1996 summer, the same MS lead had mailed me privately to propose some incompatible changes to give JS "a better design", but I couldn't make them without breaking the Web even then.)
So almost 20 years later, asserting that something adopted widely and rapidly on the Web "could have had a better design without impacting [further] adoption" is easy to do but hard to prove. I did try, with == and !=, and that attempt bounced because of adoption-in-full (taking in versioning and backward compatibility).
Number-locked versioning and related protocols such as content-negotiation via the Accept: header have failed hard on the Web, over and over.
Sure, lots could have been better, but the time to get it right was 1995 May, not during standardization in late 1996 or 1997. At that point, "don't break the Web" prevailed, as it does still, among competing browser vendors.
/be
- cpeterso 12y agoIn Firefox bug 988386, we started collecting telemetry on how often users see web content with JS versions. The hope is that we can remove some of non-standard language extensions like `for each`, old-style generators, and destructuring `for (var [k,v] in x)`. XUL is ignored for now because it defaults to JS 1.8. https://bugzilla.mozilla.org/show_bug.cgi?id=988386 https://bugzilla.mozilla.org/show_bug.cgi?id=988386 So far, version telemetry shows that JS 1.7 and 1.8 content does exist on the web, but I'm not sure how or why people are using these language extensions. I hope to add telemetry for actual use of the extensions instead of just the <script> tag version. Maybe these <script> version strings were just cargo-cult copied code and the enclosed JS is actually not using the extensions. :) http://telemetry.mozilla.org/#filter=nightly%2F33%2FJS_MINOR_VERSION&aggregates=multiselect-all!Submissions&evoOver=Time&locked=true&sanitize=true&renderhistogram=Graph http://telemetry.mozilla.org/#filter=nightly%2F33%2FJS_MINOR...