Singleton is cited as one of the most famous design patterns, along with Null Object and Composite:
How do you provide global variables in languages without global variables? Don't. Your programs will thank you for taking the time to think about design instead.That's it, that's the whole Singleton chapter. First printing: October 2002.
There's also a more recent (re)tweet:
RT @natpryce: Someone (who?) gave me a good pattern tip at #accu2010: don't say "singleton", say "globalton" instead. Nice one!
@natpryce is one of the two authors of Growing Object-Oriented Software, guided by tests.
Or some say it's an anti-pattern.
ReplyDeleteThank you for awesome post..its really helps me a lot, because it adds fuel to my determination.
ReplyDelete