What was once an often-used design pattern is now being looked at as a less than desirable coding practice:
The problem with singletons is that they introduce global state into a program, allowing anyone to access them at anytime (ignoring scope). Even worse, singletons are one of the most overused design patterns today, meaning that many people introduce this possibly detrimental global state in instances where it isn’t even necessary. What’s wrong with singletons’ use of global state?