- We design and build extraordinary applications for companies looking to make the next great idea a reality.
- learn more
ECMAScript 4: Specifics on how it might “break the web”
I love browsing Lambda the Ultimate, the "programming languages weblog," because it makes me feel stupid. There's nothing quite as educational for an undergraduate as hanging out with some grad students and finding out just how much he's still got to learn about his chosen discipline. That's how I feel when I read Lambda. I might not "get" everything, but I always come away with a bunch of stuff to look up and explore.
Lo and behold, today's Lambda post delves into ECMAScript Edition 4 and Backwards Compatibility. I posted yesterday about the ECMAScript 4 brawl, but trust the folks behind Lambda to sidestep the drama and focus on the actual impact the proposed changes would demand of existing JavaScript programs in the wild. Of course, the paper the article links to comes from Adobe Systems, the Mozilla Foundation and others who've been playing a major or supporting role in the aforementioned drama. Still, it's packed with useful information for those who haven't made it through the draft language overview or given the reference implementation a spin.
Topics: Javascript
Comments: 1 so far
Leave a comment
About Pathfinder
Recent
- Pimp my jQuery: Five plugins to replace the features Prototype and Scriptaculous users expect
- Thanksgiving 2008: What We’re Thankful For (In Rails)
- iPhone SDK: Testing with TextMate & GTM
- GWTQuery - JQuery-like Syntax in GWT
- Ask the readers: How do I fire native browser events in Prototype.js?
- News Rollup for the Week of November 17, 2008
- Rails ThreatDown!
- Automated Deployments Rock
- Bandwidth profiling Flex projects and more with Charles
- iPhone SDK: UIViewController Testing & TDD
Archives
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006


Hi, that’s indeed the document produced by the majority in the Ecma standards body — not just Adobe and Mozilla, also Opera (Opera reps have made huge contributions over the last two years) and others.
Notice how the doc cites precedent in browsers for all but two of the changes from ES3 to ES4. In other words, browsers did something different (sometimes for good reason, sometimes for bad, but the precedent took) and de-facto behavior trumps de-jure standard. That’s real-world web standards in action.
Of the two changes without precedent in browsers, one is mitigated by inconsistencies in ES3 — you can rebind Object or Array in ES3 (a JSON security hazard), but not all of the ES3 spec uses your new value for those standard constructor functions — sometimes ES3 uses the “original” value!
The other “true incompatibility”, how |this| propagates from an outer to an inner function when the outer calls the inner, is a bug fix to ES3. We’ll be testing it against the web, including in Firefox 3 pre-releases, so if it turns out to break something, we can make it happen only when script authors opt into ES4. See, we’re actually not trying to lose market share while we evolve the web ;-).
/be
Comment by Brendan Eich, Tuesday, November 6, 2007 @ 7:41 pm