Groovy hepcat Blake Gaffney jived with All on 10 Apr 98 18:14:22!
Local static's a cool scene. Dig it!
BG> You know that in good OOP you should avoid global data/functions. I
BG> try to do that as often as possible, but sometimes I use static data
BG> or functions within a class.
BG> What I want to know is, is this as evil as using global
BG> data/functions?
Think of it this way... Why should you not use too many global
variables? It is inconducive of OO principles. That is, global data is
not hidden, not part of an object, and as such, is susceptible to
errors from unknown or multiple sources.
So, does a static variable within a class suffer these problems? No.
It is as object oriented as any other variable within a class.
Wolvaen
... Well, I'll be a son of a witch! - Bart Simpson
--- Blue Wave/RA v2.20
---------------
* Origin: The Gate, Melbourne Australia, +61-3-9809-5097 33.6k (3:633/159)
|