Conventions/code/patterns/singleton: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

5 October 2023

  • curprev 16:3216:32, 5 October 2023Woozle talk contribs 1,034 bytes +1,034 Created page with "Singleton objects are a fairly common code-pattern; the following are my conventions for them. The basic idea of a singleton class is that you want to only ever create one object from it. Since much of the usefulness of this method is the ability to have methods that are effectively global functions while still being nicely packaged in a way that makes it clear where they come from (and allows autoloading), it's useful for the class to have a static method (I use "Me()..."