CompuServe Messages

ObjectOriented

    20-Sep-95 22:21:56
Sb: #48207-ObjectOriented
Fm: Bart Van Bockstaele 100574,2352
To: Peter Wade 100265,2740
>>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.<< Exactly what I do. When I wrote my accounting package, I designed all data structures first and only then made my programs. >>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.<< I have taught a course in C++ programming techniques. The trouble with C++ is that it is a complex language. So complex that you cannot possibly know everything about it? >>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.<< When I learned to program 17 years ago, I started with BASIC. A few years later, PASCAL, became “popular'' and I was laughed at because of the ambiguities in BASIC. example: A = B should be written like LET A = B because it is not a real equation. PASCAL is much better because you have to write A := B which is much better. BASIC is horrible because of the ambiguity between A = 12 + 5 and A$ = B$ + C$. The same people who said this nonsens know find it very professional to redefine about every operator that exists. Their logic deludes me completely. Bart Van Bockstaele at 100574.2352@compuserve.com … On AutoPilot and Amiga all the way from Belgium NOT from Mars!…