Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Singleton Is a Bad Idea.
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.
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