3 ms·
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 no
by Fire-Dragon-DoL 5y ago
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