January 19 meeting notes

Brendan Eich brendan at mozilla.org
Fri Jan 20 10:24:05 PST 2012

> Andreas Rossberg <mailto:rossberg at google.com>
> January 20, 2012 10:17 AM
> Here is a simple model: a function expression introduces one local
> scope(*), which contains the parameters and the var variables hoisted
> from its body (as in ES5). The function is evaluated by evaluating its
> body _as a block_ (which it is, syntactically).
> This is a simpler, more compositional rule with fewer special cases.
> In effect, you have two scopes, but there is nothing special at all
> about the inner one. In particular, var-bound vars are hoisted out of
> this block like they are hoisted out of inner blocks.
> This is fully backwards compatible, AFAICS.
> (*) Ignoring the extra scope for the optional function name.

+1. I do not see how we can make parameters be let-bound, given function 
f(x) { var x; ... } being allowed in ES5 non-strict and strict.


More information about the es-discuss mailing list