Permanent Link For Entry #1673

Safari + JavaScript 2.0

Forgot to mention that earlier this week I was surprised when the iTunes update engine on my Windows desktop popped up and said it had a new "update", which was the Safari browser. And the box was checked by default. Tsk, tsk, kind of evil, Apple getting very aggressive. I am sure they will catch so flag for it, although way less than if MS did it.

In other geeky news, I saw that JavaScript 2.0 (i.e. ECMAScript Edition 4) is finally under development. Ecma is targeting end of the year to finalize the standard. As you may already know, Ecma is responsible for many other standards, including ISO9660, the C# language specification, the C++ language speficification, or CLI. You can read more about it on Ecma's site. It's work in progress, you can download an overview of what's been proposed so far as a PDF.

The coolest thing I saw is the introduction of actual classes and interfaces, that's very nice and quite a major change. Also, no more primitives (wrappers will be provided for backward compatibility). Many other nice additions, like constants or compile time type checking, etc., check it out.


/* JavaScript 1.x "Class" Definition*/
function Foo() {
this.a = "a";
this.b = "b";
}
var myFoo = new Foo(); // class instantiation

/* JavaScript 2.0 Class Definition */
class Bar {
this.a = "a";
this.b = "b";
}
var myBar = new Bar(); // class instantiation