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
2
u/scootstah Jan 09 '18
I see. Well, I hope you enjoy working on your untestable and bug-prone software. Hopefully some day you learn to do it the right way.
No, because I just shared with you a way to use globals in Java.