Hey all,
As I start to really get a grip on OO, I am enjoying all the benefits that OO brings (it's taken a while.. old habits die hard... can you say COBOL?). There is really only one big question left...
Shouldn't everything be an object?
To clarify: I know there are advantages to using global variables and just passing a single variable from place to place in ones' code, but shouldn't data be in object for too?
It struck me that, while there is extra overhead in creating data objects isn't there the advantage of a consistent interface to the data?
For example if I pass a complex multi dim array around my code and something in the array changes, then I have to change lots of code in lots of places. However, if I pass the array around in an object, and the object knows how to access the array, then the most I will have to do is modify the objects array access code. If I made the object interface well, I may not have to change a thing.
Thoughts? Observations? Good web references that might clarify this for me would be most appreciated.
Steve Warwick
wherever you go, &this.