JavaScript/ECMAScript 5 standard approved

Wed, 2009-12-23 09:12 by admin · Forum/category:

The new standard JavaScript/ECMAScript 5 has been approved already some weeks ago. Here is the standard in PDF format. A brief excerpt:

The present fifth edition of ECMAScript (published as ECMA-262 5th edition) codifies de facto interpretations of the language specification that have become common among browser implementations and adds support for new features that have emerged since the publication of the third edition. Such features include accessor properties, reflective creation and inspection of objects, program control of property attributes, additional array manipulation functions, support for the JSON object encoding format, and a strict mode that provides enhanced error checking and program security.

Its history was a bit tangled. After the 3rd edition, which was stable and unaltered for 10 years, there should have been a 4th, but for years the committees were unable to reach a consensus, because some wanted to turn the language into a dinosaur, while others (luckily, I think) wanted to keep changes and additions within reasonable limits.

Eventually there was a proposal to issue a measured improvement of the language as an interim version 3.1, which found enough support to be materialized. Only later it was rechristened from 3.1 to 5, and it is this which we now have.

The new version is completely downward-compatible, such that all existing JavaScript programs should run unchanged. A "strict" variant can explicitly be enabled separately for each function, which restricts the language in a way that increases reliability and security.

Until now, I believe, the most popular programming language in the world is still on a good path.

The language JavaScript is, despite its moderate size, not quite so easy to learn as it first seems. Particularly its name is misleading, since the language hardly resembles Java.

Typically one can weep or laugh when looking over the shoulder of an old Java hand walking his first steps in JavaScript, which almost always fail in the most horrible ways.

But if you learn the language properly, you are rewarded with a functional richness that is particularly useful in web browsers. Almost every modern browser has an implementation of JavaScript, which is the main reason for the extremely wide distribution of the language. But JavaScript can also be used outside of browsers, for example on every Windows computer (wscript, cscript) and in PDF files.