Merry Christmas!

Did you consider adding a way for variables to automatically get the value
from a variable with the same name from the parent execution context?

(function () {
    var x = 2;

    (function () {
        local x; // x = 2
        x = 100;
        x; // x = 100

        local y; // maybe throw since y was not found anywhere
    })();

    x; // x = 2
})();

This would be useful when optimizing the code so that the variables are as
local as possible. Especially useful with calling functions (multiple
times) or working heavily with collections from the outer context in the
inner functions.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to