CompuServe Messages

#ObjectOriented

    19-Sep-95 18:48:10
Sb: #48187-#ObjectOriented
Fm: Peter Wade 100265,2740
To: Greg Comeau@Comeau Cmptg 72331,3421
When I am designing a program I usually start by looking at what information I will be using and I design data structures to represent that. Then as the design progresses I will write functions to manipulate these structures. From what I have read so far about C++, you put the data and the functions to manipiulate the data into classes. These look just like the structs that I use in C apart from the fact that they contain functions as well. There is a lot of talk about things being hidden and data only accessible to member functions but I don't see much advantage to this. If you are designing a program it is just common sense to be careful how you manipulate your data structures, why do you need some enforcement mechanism to control this? Especially since you are controlling this enforcement mechanism yourself. Then there is the polymorphism which looks very dangerous. I'd hate to have to maintain a program where any of the standard operators may have been redefined to do something different. As you can see I have only scratched the surface of OO and I hope that I will find it useful. The programming part of my course will be in Smalltalk which I hear is a more "pure OO" language, and it will continue to OO design techniques. Peter Wade Autopiloting from London, England