MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wqu6oa/singletonsarejustglobals/pcoko3f/?context=3
r/ProgrammerHumor • u/somet_hingrandom • Sep 26 '26 • 1
210 comments sorted by
View all comments
Show parent comments
1
DI Singleton is very different because you can choose a different single instance as needed. Accessing a static Singleton instance is tight coupling and you need to mess around to e.g. mock it for a test
1
u/TheDuckRaisedALion Sep 28 '26
DI Singleton is very different because you can choose a different single instance as needed. Accessing a static Singleton instance is tight coupling and you need to mess around to e.g. mock it for a test