2008-03-27

Stop. Singleton Time!

Singleton:

In software engineering, the singleton pattern is a design pattern that is used to restrict instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. Sometimes it is generalized to systems that operate more efficiently when only one or a few objects exist. It is also considered an anti-pattern since it is often used as a euphemism for global variable.

If you've ever come across one of these in a software project, please read the superb Ars Technica thread about them right now. It's by far the best discussion of this "pattern".

0 comments: