Wednesday, October 25th, 2006

Brendan Eich: JavaScript 2 and the Future of the Web

Category: Presentation, The Ajax Experience

We had the pleasure of having Brendan Eich at the event to give the final keynote.

The presentation is online now, but to be honest, it lacks Brendan’s wit. Half of the jokes come in under his breath, and his honesty is a breath of fresh air.

You would never think that this is the guy who created JavaScript and started Mozilla.

A lot of the features that Brendan talked about this time are now available in JavaScript 1.7 which is shipping in Firefox 2.0. You shouldn’t be jumping on these features willy-nilly, but if you have FF specific coding to do, give it a go (e.g. greasemonkey, extensions, etc).

Brendan Eich Keynote

Posted by Dion Almaer at 10:14 pm

4.2 rating from 39 votes


Comments feed TrackBack URI

We want something revolutionary rather than something improved?
1.5 -> 1.6 -> 1.7 -> 1.8? ->… -> 2.0
Am I going to be sticky to 1.6 before 2.0 is widely adopted?

Hey, if there is a deadline, which all of IE, Firefox, Opera, Safari and other browser teams agree, that before that deadline there must be an updated version of its browser that is JavaScript2 compatible. If browser update fails to come up, it will have all the internet world known that it fails!

Maybe we don’t want to wait for years, what about a date 555 days later as the deadline, Saturday, May 3, 2008?

I think I’m kidding. :)

Comment by Zhou Renjian — October 26, 2006

I am not able to view the presenation. I use FF but even tried IE, the presentation doesn’t show up properly, it is just me?

Comment by Thirumalai Veerasamy — October 26, 2006

So the next question is when do we get a server-side JS2 system that can communicate objects/calls directly to the client and back and load, say, php extensions server-side (to be used via JS2 rather than PHP… why write in two different interpreted languages?*)?
Imagine writing core classes once and simply having different DAOs being used client side versus server side, and a client-side DAO making an ajax call to an instance of the object on the server which could then use its cache/db/etc DAOs (that would never get sent to the client) to set up the objects. That would get exciting.
* I know, I know, not everybody uses PHP. I just use it as an example because it’s also interpreted and because it has a large set of available extensions written in C, and if they’re already being used by one non-native interpreted system, they might as well be used by another, no?

Comment by Adrian Ziemkowski — October 26, 2006

What on earth are you guys going on about? ;)

The presentation was very good. At least from a hungry technical consumer pov.

Comment by Jesse Kuhnert — October 26, 2006

Is a presentation video going to be put online? Is Eich following up with a detailed overview of what shows in the slides? Is there a progress report coming out of the ECMAScript working group, as well as a listing of companies involved? I saw the deadline, but that’s not a progress report. Most importantly: is there a commitment from the other browser makers to this plan?

Comment by Shelley — October 26, 2006

Shelley: we in ECMA TG1 (the JavaScript working group) publish snapshots of our wiki at — a new snapshot is due this week. If you look closely, you will see contributions from Microsoft, Mozilla, and Opera employees, along with other fine folks from University and small-company members — and from Doug Crockford of Yahoo!.

So the big question is “what IE release might include JS2/ES4?” But we have to finish the spec before you can hope to get an answer out of MSFT. That’s only fair: any company tracking the spec would not want to commit to a ship date before the standard is finalized.


Comment by Brendan Eich — October 26, 2006


I asked about using if using generators could restore synchronous control flow when using XHR. You explained how under some circumstances they could help, but ultimately they can’t restore synchronous control flow. Unfortunately I think the only way we could restore synchronous control flow is by using full continuations which you explained are to costly for the browser. But, could the stack inspection library proposal in the wiki give us the ability to implement full continuations? Would local variables, parameters, and such be accesible as annotations?

Comment by Charlie Hubbard — October 27, 2006

Charlie, it’s possible to implement proper tail calls in a fairly costly way, using exceptions — see This does not give you the simplified “synchronous style” programming you seek. But at least with JS2/ES4, you’ll get mandatory proper tail calls in addition to generators (yield expressions/statements). So you can avoid writing spaghetti code in most cases.

Here is where generators break down: you can yield only one generator activation “back” to the caller or “resumer” (the code that calls .next(), .send(v), or perhaps .throw(e)). If you want to restore synchronous control flow across a flow graph involving more than one function, with only the root function in the graph being the generator (where the yields are), then (bad, back to spaghetti) you will need to hand-craft a state machine to track where you left off in a subroutine, and resume there — or (better, no spaghetti but not purely synchronous either), use nested generators.

Some people might give up and use hand-rolled continuations, relying on proper tail calls to avoid consuming indefinite stack space. But doing that means explicitly turning your loops inside out and twisting them into if statements with continuations.

Nested generators are not so bad. They should be familiar to Python folks. We hope to build on that mindshare. But I know of many cases where the flow graph that one wishes to make synchronous fits entirely in a single function, and for such cases, yield alone suffices.


Comment by Brendan Eich — October 30, 2006

By “hand-rolled continuations” I mean explicit continuation-passing style (CPS). See for more on this, and on Narrative JavaScript (which compiles its extended-JS input language to CPS JS).


Comment by Brendan Eich — October 31, 2006

why can i not see this presentation :( i really wanted to see. i read all about it on your website.

Comment by zomia — October 29, 2007

Leave a comment

You must be logged in to post a comment.