Globals, Singletons and (Public) Static Members
The Unfraggable Bulk beschreibt Unterschiede und Gemeinsamkeiten von globalen variablen, singletons und public static members of a class.
Even though none of these three things are the same, they all share a single commonality: they can be accessed anywhere and in any scope.
und kommt zu dem Schluss:
Don’t use global variables. They are evil. Stay away from them! If you need that type of functionality, abstract it to the more flexible but on-the-fence-of-evil-and-good singleton. Be aware that the use of singletons will make it harder to debug your applications because of high coupling, and don’t forget about Devon and I and giving functions access to too much information. Finally, when you are coding and are using public static members, think about future maintenance of the code and ask the question: will I need the flexibility of a singleton or is this never going to need changing.

