Extending natives in simple modules

2011-01-03 Thread Irakli Gozalishvili
Hi, I have noticed that [simple modules]( http://wiki.ecmascript.org/doku.php?id=strawman:simple_modules) don't mention how does natives are supposed to behave across modules. Are they shared or each module gets it's own Object, Function, Array, ... objects ? I think this is something that

Re: Extending natives in simple modules

2011-01-03 Thread Dave Herman
Simple modules decouples this concern from that of modularizing code; modules are not state-isolated, but share the same connected graph of module instances, including the primordials (Object, Array, etc). Instead, module loaders (http://wiki.ecmascript.org/doku.php?id=strawman:module_loaders)

Parsing allowed convenience in simple modules

2011-01-03 Thread John J. Barton
In http://wiki.ecmascript.org/doku.php?id=strawman:simple_modules it says: Module declarations are only allowed at the top level of a script or module, but for convenience, they can nest within top-level blocks, and are hoisted to be in scope for the entire containing script or module. Can

Re: Parsing allowed convenience in simple modules

2011-01-03 Thread David Herman
Hi John, Module declarations are only allowed at the top level of a script or module, but for convenience, they can nest within top-level blocks, and are hoisted to be in scope for the entire containing script or module. Can someone explain what this sentence means? To me it says: