Why people dislike global variables so much while I find them so convenient?

rempas rempas at tutanota.com
Thu Jan 27 07:04:46 UTC 2022


On Wednesday, 26 January 2022 at 15:10:44 UTC, max haughton wrote:
> If a class is reasonable, use a class, however if it's just 
> some mutable state then use a struct since you don't need OOP

Yeah, I changed my code to use a struct. I don't need to allocate 
memory on the heap and I use "betterC" so I cannot use classes 
anyway. Thanks!


More information about the Digitalmars-d mailing list