Currently any two modules have a global communication channel available through any of the global objects. This isn't good. There are at least 3 possible solutions.
Run each module in its own realm. As I understand it, this will be the approach taken by ES6.
Freeze the globals to prevent modification.
Require importing everything -- remove the concept of "globals" from the language. (Note that with a good module loader system, requiring the built-ins to be imported would make preventing communication possible, and in fact would give people the choice to choose option 1 or 2 by setting it up in the module loader.)
At this point any of these options sound promising. I've been working under the assumption that option 1 would be the direction we went, but the other options should be considered as well.
Currently any two modules have a global communication channel available through any of the global objects. This isn't good. There are at least 3 possible solutions.
At this point any of these options sound promising. I've been working under the assumption that option 1 would be the direction we went, but the other options should be considered as well.
What should we do?