Update 2011-09-16: Source maps are coming to WebKit, too. Mozilla and WebKit implementers might even agree on a common format.
More and more languages are compiled to JavaScript. Mozilla has plans to let you debug those languages in their source code (no need to look at JavaScript).
This blog post explains the difference between JavaScript and ECMAScript. And the differences between ECMAScript.next, ECMAScript 6 and ECMAScript Harmony.
[2011-11-04] “Myth: JavaScript needs classes” introduces a more concise name for “prototypes as classes”: object exemplars. An exemplar is a factory for instances, constructors are function exemplars.
[2012-10-03] Since this article has been written, it was decided that ECMAScript will have the special property __proto__ instead of the <| operator.
JavaScript’s prototypal inheritance is hard to understand, especially for people coming from other languages that are used to classes. This post explains that it does not have to be that way: The proposal “prototypes as classes” is a simplification of classes and inheritance in JavaScript. It might become part of ECMAScript.next, a.k.a. “the next version of JavaScript” (after ECMAScript 5). But there is also a library that allows you to use its features in today’s JavaScript. What’s intriguing about prototypes as classes is that they aren’t a radical departure from current practices, but rather a clarification of them.
Incidentally, this post is also a good introduction to JavaScript inheritance, because the basics are easier to understand with prototypes as classes.
The post “Classes in Coffeescript” contains an interesting juxtaposition of CoffeeScript code and the JavaScript it is translated to. This post examines the result of the translation in more detail, which nicely illustrates how subclassing works in JavaScript. To understand the following, you should be familiar with JavaScript’s prototypal inheritance (explained here).
All objects produced by built-in constructor functions in JavaScript have a property called constructor. This post explains what that property is all about.
It used to be that some JavaScript engines weren’t picky about trailing commas inside an object literals, while others threw a syntax error. The ECMAScript 5 language specification [1] has made trailing commas legal, via the following syntax rule (in Sect. 11.1.5):
2011-09-25: More and updated material on proxies, array comprehensions, and classes. Moved private name objects to new post.
Brendan Eich held a talk [1] at the TXJS conference in which he detailed the latest updates on ECMAScript.next. This post lists the highlights of his slides and adds a few explanations.
If you have ever read the “Gang of Four” book on design patterns [1] or worked with the Eclipse Java IDE (and platform) then you are probably familiar with the name Erich Gamma who was deeply involved in both. Recent news was that Gamma had left IBM and stopped working on Eclipse [4]. Now Microsoft announces that he will join them [source: Heise via Ludwig Adam]. Quote: