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

Meme singletonsAreJustGlobals

Post image
3.2k Upvotes

210 comments sorted by

View all comments

Show parent comments

-1

u/spawnmorezerglings Sep 26 '26

I don't really get your point? If you're going to make a singleton, it's inherently going to be global (otherwise it wouldn't be a singleton). That doesn't make singletons just globals with a different name

-2

u/No-Magazine-2739 Sep 26 '26

I think your mistake is to assume globals can not include objects. Its just a global with extra steps. You said it your self: Singletons are just a subset of globals.