Abstract
The Singleton is the most hated design pattern in the (rather limited) history of design patterns. That said, however, it doesn’t mean you shouldn’t use the Singleton: a toilet brush is not the most pleasant device either, but sometimes it is simply necessary.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Note that, similar to C#, F#’s default implementation also uses lazy. The only difference is that F# has a somewhat more concise syntax: writing lazy(x + y()) automatically constructs a Lazy<’T> behind the scenes.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Dmitri Nesteruk
About this chapter
Cite this chapter
Nesteruk, D. (2019). Singleton. In: Design Patterns in .NET. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4366-4_6
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4366-4_6
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4365-7
Online ISBN: 978-1-4842-4366-4
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)