you are viewing a single comment's thread
view the rest of the comments
[–] 12 points 1 day ago*

it’s common programming advice that global variables are bad

They're not. This is what we tell beginners because one needs to be careful when maintaining a global state and beginners often do it horribly.

But having a global state is sometimes the right solution.

Pro tip: if you ever find yourself saying "x programming practice is always wrong" you're probably wrong.

  • source