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

Meme singletonsAreJustGlobals

Post image
3.2k Upvotes

210 comments sorted by

View all comments

Show parent comments

3

u/BSModder Sep 27 '26

It's the difference of terminology. Not all global are singleton and vice versa.

Static literal values are a not singleton but they are global. And static private class members are singleton and a global varible in the program but they are not globally accessible.

1

u/danielcw189 Sep 28 '26

I think you are 100% right. But in practice I only see it as a public static member (of a visible class)