Wednesday, December 30, 2009

ECMAScript 262 Ed. 3 allows extensions

That ECMAScript allows other extensions is no surprise to me. As Chapter 16 states:

An implementation may provide additional types, values, objects, properties, and functions beyond those described in this specification. This may cause constructs (such as looking up a variable in the global scope) to have implementation-defined behaviour instead of throwing an error (such as ReferenceError).

But what surprised me is the reply I got to this bugreport:

The extension in SpiderMonkey is old and it serves to satisfy the conditional compilation use-case:
if (DEBUG) {
  function maybe() {...}
if DEBUG evaluates to falsy, no function maybe is defined. More, this means the binding of maybe depends on evaluation of the sub-statement containing it. Same goes for the testcase in comment 0. ECMA-262 Ed. 3 (chapter 16) allows syntactic extensions, which the function as sub-statement definitely is an example of. That we differ from other browsers is a tolerable consequence of ES3 chapter 16 allowing syntactic extension. Note that for ES4, function in a block will be block-scoped, but hoiste to top of the block, so the testcase in comment 0 will work.

So basically all Mozilla implementations of ES3 (SpiderMonkey, Rhino, Tamarin?) have been extended so that if changes the behaviour described in ES3 10.1.3. Functions (not variables) are not added to the Scope Chain if they are wrapped in an if which doesn't evaluate to true.

Doesn't seem much of a problem though as there are only two bug reports about it and an only one comment explaining why it is the way it is.

Thursday, May 14, 2009

Florence And The Machine

Dog Days

Kiss With a Fist

Rabbit Heart (Raise It Up)

Could find a proper video for the song Lungs, which is really awesome

Their album Lungs should be out on June 9th in the UK, no idea when it's out in the rest of the world.

Thursday, February 26, 2009

Dinge die man nicht finden möchte

Die MD5 Summe seines Passworts. Je mehr Treffer desto einfacher ist es.

Friday, February 06, 2009

Model M PS/2 to USB Adapter

Auf der Arbeit habe ich seit dieser Woche einen neuen Rechner ohne PS/2 Anschluß. Damit ich nicht auf meine alte IBM Model M verzichten muß habe ich jetzt einen USB-PS/2 Adapter gekauft der imho recht günstig ist, nur bei den Versandkosten hätte ich noch schauen sollen ob ich noch was brauche.