News for hackers. Stuff that matters.
Re:Singleton Is a Bad Idea by Fire-Dragon-DoL on Monday April 11, 2022 @05:16AM (#30986387)
Singleton is not a bad idea, it's just misused.

As many pointed out, singleton = global variable.

That is the wrong approach. Treating the singleton like a normal object that must be injected makes the pattern way more useful and safe

There are no comments on this comment yet.