logoalt Hacker News

dkerstenlast Thursday at 10:15 AM0 repliesview on HN

Singletons are globals and should be treated the same as every other global (that is, used sparingly and with care).

Worse is that singletons enfurece a single instance which is almost always unnecessary. It’s trivial to only create as many instances as you need.