DEV Community

Discussion on: Are global variables bad?

Collapse
 
eljayadobe profile image
Eljay-Adobe

Global mutable variables makes it much easier to create bugs.

Where global is "mutable variables which are ex machina to the routine", including mutable instance variables.

And easier to create spooky action at a distance bugs, which are always fun to track down.

Throw multithreaded programming into the mix, and bam instant job security.