That will prove awful both in deed and word.
Global variables make it harder to run independent subprograms in the same program. If the subprograms happen to have global variables that share the same names, then they will interfere with each other and likely fail, usually in difficult to diagnose ways.
Lots of languages have global variables. For example, Java's
public static members are global variables. The
does not have a linker. All compilation units are loaded into a common global
There are three ways to define global variables. The first is to place a
var statement outside of any function:
var foo = value;
The second is to add a property directly to the global object. The ...