On Sat, 13 Dec 2003, MenTaLguY wrote:
You know, being a usability freak, I care about usability not only for users but for coders too. I think that the coder should not be forced to provide anything but the obviously necessary information for each task.
My experience with using global variables over the years is that they DON'T make code more usable for developers (I use the term "maintainable"), in the long run.
I agree that our codebase _does_ have significant maintainability problems at this point, but using globals more heavily would only make them worse.
The change to C++ may offer some better options for handling application state, such as use of Singletons. I think Mental's point is valid, that we want to decrease rather than increase any use of globals. Passing extra handles around can seem like a chore but can really help maintain interface integrity.
One of our goals is to find ways we can better modularize the code, for example breaking out an SVG Canvas object. The trick to doing this, of course, is having clean interfaces. I think this is one of the reasons Mental is concerned about how this state info is handled.
Bryce