function hoisting like var

Ingvar von Schoultz ingvar-v-s at
Fri Aug 1 18:40:33 PDT 2008

Okay then, even shorter.

Brendan Eich wrote:
> But it is not what you proposed.

In what way? Please be more specific, because I don't know what
this supposed proposal of mine is.

For example, those scope questions mention rebinding in a visible
scope, midway through its code block, but that's unrelated to
anything I've proposed and unrelated to how JavaScript works.

I've tried to guess what you think I've proposed from the scope
questions, but the guessing has made my answers long. Stupid
mistake, I should have asked instead, sorry.

So please say something specific that I can address.

> Waldemar wrote a while back: "Keep in mind that function assignments  
> hoist to the beginning of the scope in which the function is defined,
> so your proposal won't work."

It works perfectly well. The initial |undefined| is fully intentional,
it protects against capture problems. It's a minor limitation, certainly
not a showstopper.

Ingvar von Schoultz

More information about the Es4-discuss mailing list