JavaScript works similar to this this and apps/libraries that wrap themselves in a giant closure work almost exactly like this.
Nope. Joe's thought experiment is: what if every function became available in the global namespace? What if every function got kept in a global datastore so you: launch your REPL, run any function, and have it pulled down and work immediately. No imports unless you need to pin a specific function to a specific past revision.
Of course, someone would come along and say "these 30 functions only work together when pinned to these specific revisions," so you end up pulling down a named bundle of specific revisions, ...
Re:Why do we need modules at all? (2011)
by protonfish on Friday November 07, 2014 @10:16AM
(#8572846)
This problem can happen in any codebase, though I can see the argument that it might be more prevalent without modules. I can also see a lot of solutions: modifying functions to always be backward-compatible and defining the behavior of a function with a thorough unit test.
Not saying this Erlang idea isn't good or wont work, just these are the pitfalls besides the obvious name spacing and conflicts.