It just seems like asm.js and PNaCl are closer than people are admitting.Some of the other points he is making are more controversial, so be sure to read the comments to get the complete picture.
> Math.pow(2, 1024) Infinity > Math.pow(2, 1023) 8.98846567431158e+307What is going on here?
Closures are a powerful JavaScript feature: If a function leaves the place where it was created, it still has access to all variables that existed at that place. This blog post explains how closures work and why one has to be careful w.r.t. inadvertent sharing of variables.
In most programming languages, variables only exist within the block in which they have been declared. In JavaScript, they exist in the complete (innermost) surrounding function:
function func(x) { console.log(tmp); // undefined if (x < 0) { var tmp = 100 - x; // (*) ... } }
The basics of parameter handling in JavaScript are simple, advanced tasks require manual work. This blog post first looks at the basics and then covers advanced topics.