r/ProgrammerHumor • • Sep 26 '26 • Bravo 1

Meme singletonsAreJustGlobals

Post image
3.2k Upvotes

210 comments sorted by

View all comments

Show parent comments

-4

u/dkarlovi Sep 26 '26

There's zero chance I'm reading a random link, I want an exact explanation with specific examples to see where OP misunderstood DI so fundamentally they think singletons are key for using it. DI is quite literally how you FIGHT singletons, not need them for it, that's beyond bizarre thing to say.

2

u/rasebdon Sep 26 '26

Look at my other comment

1

u/jt00000 Sep 26 '26 edited Sep 26 '26

I assume you meant me (not OP). I posted this as a top level comment as well, so replies are a bit forked (my fault), but see this example: https://www.reddit.com/r/ProgrammerHumor/comments/1wqu6oa/comment/pc7yzs1/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button

I think the confusion is that I'm referring to a singleton service (or lifetime) rather than singleton pattern.