Fun with word mincing: whats global?
Posted by: More Whidbey stuff,
on 24 Oct 2014 |
View original | Bookmarked: 0 time(s)
I had a fun discussion with Rob on my last post, which led me to think about global variables and what we mean by “global”. Rob was arguing that a Node module is not strictly speaking global because it isn’t accessible unless you require it. That’s accurate, of course, but I’d still call that global in the sense that any code in the application that calls require will get the exact same object. The trick however is to only export from your modules constructors or factories....