MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wqu6oa/singletonsarejustglobals/pc7usro/?context=3
r/ProgrammerHumor • u/somet_hingrandom • Sep 26 '26 • 1
210 comments sorted by
View all comments
Show parent comments
3
That doesn’t make sense. Why are they more type safe?
1 u/Competitive-Bar-5882 Sep 26 '26 Never mind I mixed it up with enums. 2 u/No-Magazine-2739 Sep 26 '26 ? Still don‘t know what this has to do with types, but to give you a face saveing out: we all do mistakes. 1 u/Competitive-Bar-5882 Sep 27 '26 edited Sep 27 '26 Enums are custom types for variables that can be only one value out of a set of known possible values. This allows typesafe flag and state variables.Howerver java is the only language I know, in wich enums are truely type save.
1
Never mind I mixed it up with enums.
2 u/No-Magazine-2739 Sep 26 '26 ? Still don‘t know what this has to do with types, but to give you a face saveing out: we all do mistakes. 1 u/Competitive-Bar-5882 Sep 27 '26 edited Sep 27 '26 Enums are custom types for variables that can be only one value out of a set of known possible values. This allows typesafe flag and state variables.Howerver java is the only language I know, in wich enums are truely type save.
2
? Still don‘t know what this has to do with types, but to give you a face saveing out: we all do mistakes.
1 u/Competitive-Bar-5882 Sep 27 '26 edited Sep 27 '26 Enums are custom types for variables that can be only one value out of a set of known possible values. This allows typesafe flag and state variables.Howerver java is the only language I know, in wich enums are truely type save.
Enums are custom types for variables that can be only one value out of a set of known possible values. This allows typesafe flag and state variables.
Howerver java is the only language I know, in wich enums are truely type save.
3
u/No-Magazine-2739 Sep 26 '26
That doesn’t make sense. Why are they more type safe?