Beware singletons

From CSSEMediaWiki
Jump to: navigation, search
Do not turn objects of a class into derived classes of the class. Be very suspicious of any derived class for which there is only one instance. --Riel's Heuristic 5.15, Arthur Riel 1996

For the purposes of this maxim, "singleton" refers not specifically to the Singleton design pattern, but to any class of which there is only one instance. The risks of using the Singleton pattern are discussed on the Singleton page.

Personal tools