by bcoates · 13y ago · 0 comments
Unnecessary singletons are usually a sign that someone, somewhere designed a way too general system that allowed multiple instances of something, then nobody ever used that feature, then someone else came in and made things a bit saner by adding a singleton constraint, leaving vestigial object-ness and meaningless pointers being passed around everywhere.
In a perfect world with perfect programmers you'd never see one so the instinct that they smell bad is correct.
I fail to see how that makes anything saner.
Of course the right thing to do is to simplify the rest of the program to take advantage of the new assumption but maintenance programmers don't always have the luxury.