My application has a Config singleton, a Logger singleton and a Database singleton, each reached through a static getInstance() from wherever it is needed. I keep reading that singletons and global state are harmful, but every part of the program genuinely needs these objects and there really should be only one of each.
What exactly is the harm if the design matches reality, and what is the alternative that does not involve passing ten parameters to every function?




