I'm not a big fan of singletons, especially when they are used as they often are - as glorified globals. That being said, it occasionally makes sense to have some kind of shared instance of an object; not a true singleton that strictly prevents more than one allocation, but a convenient default instance.
Apple uses this pattern frequently throughout their frameworks: [NSUserDefaults standardUserDefaults], [UIScreen mainScreen] and many, many more.
Conceptually, I like to think of these methods as convenient accessors to instances representing a shared or common resource rather than singletons and I still try and avoid using them as globals where possible.
Your new post is loading...