The current design permits free access to variables from within
closures, and this is one of its selling points (and not something I
would personally even consider removing). In any case, even if we did
somehow limit ourselves to closures without an environment---a foreign
concept in JavaScript, though one that might be useful in various
applications---it wouldn't help that much. JavaScript is just not
designed for effect isolation. First off, there are global variables
(which are in fact the default) and, secondly, every object has access
to its (mutable) prototype chain, which is also global state.
Niko
> _______________________________________________
> dev-tech-js-engine-rivertrail mailing list
>
dev-tech-js-en...@lists.mozilla.org
>
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rivertrail