self doesn't cost anything
removing global variables is worth it.
As you write larger and larger code, sooner or later a global will burn you badly.
consider the following where two programmers are working on the same code.
both use the same global variable, but in different functions.
Programmer A changes the global variable.
Programmer B had changed the global variable at the start of his routine, prior to the change that
programmer A made.
Next, based on the value in the global, programmer B executes code that erases backup files.
Not good
removing global variables is worth it.
As you write larger and larger code, sooner or later a global will burn you badly.
consider the following where two programmers are working on the same code.
both use the same global variable, but in different functions.
Programmer A changes the global variable.
Programmer B had changed the global variable at the start of his routine, prior to the change that
programmer A made.
Next, based on the value in the global, programmer B executes code that erases backup files.
Not good