this post was submitted on 07 Oct 2025
171 points (90.9% liked)
Programmer Humor
28465 readers
1639 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Looks like there's just a private constructor and a public getter for the instance.
With no indication of why we should think such a thing should be. Singletons are sometimes useful, but they are the wrong answer to your problems more often than the right one. Even where they are a good answer to your problem a class should rarely enforce its own singletonness.
Please don't make me tap the Gang of Four's Design Patterns book
That book did immeasurable damage to the software industry