raul mihaila (2013-12-24T17:10:19.000Z)
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131224/de9ac1cd/attachment.html>
domenic at domenicdenicola.com (2014-01-06T14:04:32.372Z)
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?

```js
(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.