Home / Companies / Contentful / Blog / Post Details
Content Deep Dive

The singleton pattern: evil or just misused?

Blog post from Contentful

Post Details
Company
Date Published
Author
David Litvak
Word Count
1,083
Language
English
Hacker News Points
-
Summary

The book "Design Patterns: Elements of Reusable Object-Oriented Software" published in the early 90s introduced a universal language among software developers, allowing them to share and understand each other's implementations. The GoF authors curated and named design patterns, which are formalized best practices that solve common problems when designing an application or system. While design patterns have been beneficial, some critics argue that they have become redundant with new developments and that people use them unnecessarily, increasing abstraction in code. However, the singleton pattern is particularly problematic due to its inflexibility and potential to cause bugs that are difficult to test and debug, making it a questionable choice for many cases.