At the top of my .m files I traditionally have a const int varWidth = 42;
or something similar. If I want it public I'll add extern const int varWidth
in my .h.
However, after reading this link it's recommended apparently that static is prepended if it's used solely in the .m file (but not if public). Why is this?
I understand static means it will only be initialized once and its value will persist for the full execution of the program, but I don't see how that's important if it's a const anyway.