Re:Singleton Is a Bad Idea
by cr__ on Sunday April 10, 2022 @02:50PM
(#30980397)
Why not explicitly initialize the one-off components and pass them to the other parts of the system that need them as arguments so the system is testable and dependencies are clear?
(I know why, generally—low-expressivity languages make it nightmarish to actually do this.)
(I know why, generally—low-expressivity languages make it nightmarish to actually do this.)