The Singleton Design Pattern

The singleton is a pattern where a class is created with the anticipation of only ever being instantiated once1. This enables the class to be directly synonymous with it's instantiation; or perhaps for the instantiation to be an interface for the class. When the singleton instance is accessible globally (which seems to be the usual case) the singleton provides a sort of lazy-loadable global that doesn't actually pollute global space either literally or conceptually.

At a glance, singletons:

Interesting Examples of Singletons

Footnotes

  1. In fact, classes may not be neccessary at all. More research needed - JRR Nov 24