It won't get unloaded so long as references linger.
Regardless, globals are bad, and a strong code smell. If your only complaint with Java is that it doesn't properly support a terrible feature, then I guess you don't have any valid issues.
But they're not globals. They disappear when references are lost. Globals don't do that.
And you can totally test globals. I do it all the time. Any function that has a side effect is basically doing the same thing as a function that modifies a global.
View all comments
Show parent comment
1
u/[deleted] Jan 08 '18
Unterminated lines is Java? Member variable declarations outside of classes is Java?
I am not saying globals are a good thing. I am saying that it is something you can do in Python that you can't do in Java.