A few months ago or so, I made a post about what the singleton pattern costs you. Although I stated my case in terms of trade-offs rather than prescriptive advice, I still didn’t paint the singleton pattern in a flattering light. Instead, I talked about the problems that singletons tend to create in codebases.
Whenever I’ve talked about the singleton pattern, anywhere I’m blogging, the general response follows a typical signature. It attracts a relatively large amount of shares (usually indicating support) and traffic (often indicating support) while generating comments (these often contain objections). Generally, the response follows this pattern from Stack Overflow. At the time of writing: