I have been a little worried about JavaScript, the language that you know…. powers the Web client right now.
Fortunately, it appears that a bunch of the engineers on the ECMAScript standards groups came together in Oslo and actually make a good effort at coming together.
This is huge news, so we asked Brendan Eich and Arun Ranganathan of Mozilla to join their college John Resig, Alex Russell, and myself to talk us through.
You can download the podcast directly (OGG format too), or subscribe to the series, including via iTunes).
What ensued is a lesson on language design, politics and process, a lot of history, and hopefully the path to a positive future.
This podcast is a big boy. It weighs in at an olympic 1 hour 5 minutes and covers a lot.
It kicks in with Brendan taking us through the history of ECMAScript. He talks about handing over the keys to JavaScript, how Macromedia pushed forward with the like of E4X, and more.
He then gets to ES4 and I learnt about features that helped the compact area back in the day.
Then we got to the recent news. What happened in Oslo, and where are we heading?
We discussed the too worlds of 3.1 (wanting to do nothing, or even pair down) and 4 (the big rewrite). The big coming together seemed to happen due to the ES4 group taking out some features (namespaces and packages…. which actually came out awhile ago) and the 3.1 group seeing that they could actually add some features (Object.freeze, Object.defineProperty).
Then the group bought into opt-in versioning as a way to get past the barrier of vendors not wanting changes that break the way they do things. This gave them the on-ramp.
One of the most popular words throughout this section, and the podcast, is “desugaring”. It appears that a lot of time and effort went into seeing if new features like “class” could actually be sugar on top. This desugaring proof was used to show which features could be done, and which couldn’t, in a nice backwards compatible way.
Alex asked if new features could be proposed, and specifically about the new lambda syntax that had been thrown out there: {{}}
Brendan answered saying that he thought the solution to too many function(){}
’s was giving people new constructs like class
so function(){} isn’t used for everything as it is now. During this answer Brendan also said “… Lambda the Ultimate …” which meant that John, Alex, and I, each had to do a shot of whiskey. You will too if you find that quote.
What about inheritance? Arun threw out a question on where people stand on inheritance. People very much don’t want to mix class based and prototypal, and then we moved on to the idea of zero instead of single inheritance and then the idea of “Likes” and shapes instead of class types.
We also discussed types in the sense of optional typing. Early on I heard a lot of “we need types for performance” and Brendan, again, dispelled this myth. He even added that Adobe has seen programmers make their code slower by adding var foo:int
which doesn’t make a machine int as C programmers would expect.
I asked about the versioning side of things, and how onclick="someCode()"
would run. Brendan then gave a detailed view of how this all ties together, how there is a “default” scripting language for a page, how you can change it with a HTTP header / meta tag, and how IE actually has onclick="javascript:someCode()"
.
Finally, we discussed how Adobe/Tamarin is effected by the news, which Mike Chambers of Adobe has discussed too, and the general contention of the group. Brendan tied this all together and we end with a “time to get over it and move forward together” feeling. There is work to be done, but a lot has happened in the last few months.
We are hoping to talk to the Microsoft contingent on the issue (a big question for JavaScripters will be what gets into IE!) in another podcast. Doug Crockford has spoken out too and then we can move on to some non-JavaScript Open Web issues!
Comments