ES Modules: suggestions for improvement

Aymeric Vitte vitteaymeric at
Thu Jun 28 01:30:48 PDT 2012

>> I think we all agree that global isolation is the core purpose of a
>> module system.  (Is that incorrect?)
> Partly agree? I believe that obviating the *need* for globals is the core purpose of a module system. I don't believe that modules should necessarily be strictly separated. Modules should be given clean local scopes so that they don't overwrite each other, but that doesn't mean they shouldn't be able to still communicate via the global object.
Yes, exactly, if I can dare a comparison, a module could behave 
somewhere like the theorical 'wrap' here 
(sorry to bother with this), contexts are separated, you can not create 
global vars inside the 'wrap' but can access them, you decide what 
should come into the 'wrap' and what goes out, so what you can/want to 
share, a bit like having a super global outside and multiple globals 
inside the 'wraps' (or modules)

Email :  avitte at
Web :
Webble :
Extract Widget Mobile :
BlimpMe! :

More information about the es-discuss mailing list