On Thu, Apr 14, 2011 at 3:29 PM, Dmitry A. Soshnikov
<[email protected]> wrote:

>> But these globals won't be accessible to scripts that have already been
>> compiled; only to scripts that are subsequently compiled and evaluated, e.g.
>> via ModuleLoader.eval.
>
> Which again seems as in chaise of efficiency, let's take away (a little of)
> convenience from a user.

This isn't about efficiency at all!

The reason that Dave and I have worked hard to make modules lexically
scoped, of which this is a part, is so that when you look at a
program, you can understand what it does.  This is a fundamental part
of programming, and not having a clear binding structure in your
language makes it much harder.

Sometimes, this makes your program more efficient, too, because the
compiler understands your program better for the same reasons that you
can understand your program more easily.  But that really isn't the
point.
-- 
sam th
[email protected]
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to