On Wednesday, December 26, 2012, Brandon Benvie wrote:

> I guess to sum up what I think Domenic was saying: people hoist var
> declarations so that their code acts the way the engine is going to execute
> it in order to prevent a mismatch between expectations and result. If there
> wasn't a reason to do that (AKA TDZ-UBI) then it wouldn't be done, because
> it's not otherwise desirable to do.
>
>
>
Conversely, many also believe there is benefit in having a single place in
a function to locate all of the formal parameter names and initialized
identifiers. Assignment close to use also embraced by this pattern.
Subjectively, this makes it easier to identify free vars used in the
function.

Many also believe that hoisting is an excellent feature, not a weirdness.

Rick
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to