Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I thought this release was supposed to have ActionScript style optional type annotations and classical inheritance. Not to say I'm sad to not see them here (JS being dynamic and prototypal seems nicer to me), but anyone know what happened to those?


The latest official ECMAScript standard is ECMAScript 3rd edition from 1999. Since then there have been several attempts to create an upgrade, known as ECMAScript 4. For example ActionScript 3 and Microsofts JScript.Net is actually based on an abandoned ECMAScript 4 proposal from around 2000-2003, a spec that way heavily influenced by Java. A new ECMAScript 4 effort started a few years ago with Brendan Eich as editor, which was more inspired by dynamic and functional languages.

However the new ECMAScript 4 spec was pretty large and ambitious, and some parts of the working groups called for a lesser, incremental spec release to fix some of the most needed fixes. This proposal was called ECMASCript 3.1. Then it was decided to scale the ambitious ECMAScript 4 spec back, and this scaled back version (which is still in flux) is called ECMAScript Harmony.

Now ECMAScript 3.1 has been released, but they have decided to give it the official name ECMAScript 5th edition, thereby leapfrogging the 4th edition! This might be because "ECMAScript 4" have gotten a bad name because of the several failed attempts. Also, it is obviously confusing when widely different specs gets the same name.

Harmony will then probably be 6th edition, and if some of the features from ES4 which was culled from Harmony appears in a later spec, it might be in 7th edition!


Ah yes, that rings a bell—thanks for the thorough refresher!


While ES5 doesn't have ES4/ActionScript classes, some of the features it introduces (like Object.freeze) are explicitly design to support classical inheritance, and the ES "Harmony" project will probably build more classical OOP syntax into the next version, on top of the new ES4 semantics.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: