Singleton: Difference between revisions

From Helpful
Jump to navigation Jump to search
(Created page with "<!-- A singleton is something there is exactly one of. In your OO modeling, this often refers to a factory that always returns the same object. In a language, it tends to...")
 
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{programming}}
<!--
<!--
A singleton is something there is exactly one of.
A [[singleton]] is something there is exactly one of.
 




Line 7: Line 8:


In a language, it tends to refer to some special-cased types and/or values.
In a language, it tends to refer to some special-cased types and/or values.
: For example, values like None/null may be their own type and have just one singleton value.
: ...or, if you're going to get technical, most [[primitives types]],
:: and OO languages will make a point of this somewhere in their specs.


For example, values like None/null may be their own type and have just one singleton value.


-->
-->

Latest revision as of 14:14, 3 March 2024