****SPAM(11.2)**** [Tutor] Larger program organization
Terry Carroll
carroll at tjc.com
Wed Feb 16 22:18:41 CET 2005
On Fri, 11 Feb 2005, Bob Gailer wrote:
> Whenever you find yourself writing an if statement ask whether this
> would be better handled by subclasses. Whenever you find yourself about
> to write a global statement, consider making the variables properties of
> a class.
Bob --
Brian already asked for an explanation of your first statement, and I
found the ensuing discussion very instructive.
Can you explain the second? As an aesthetic point, I hate globals, and
I'd love a discussion with some examples of using class variables as a way
of avoiding this.
Terry
More information about the Tutor
mailing list