re: Are global variables bad? VIEW POST

re: The question still requires more information, because it depends on the situation it is in. Take embedded programming with an "easy" case: a smal...

Yes, context is important. It's what I was hinting at when I mentioned a micro-service architecture, but didn't want to get into too many other options.

I also mentioned briefly that the "type" of the variable is important as well. This can also depend on domain, and threading, but certain types, like fundamentals, are a bit safer as globals than large classes, or pointers.

code of conduct - report abuse