Disclaimer: The following diatribe is unabashedly pro C++ and pro OOP, but I do not attempt to obscure the facts in any way.
Myth #1: Classes are automatically less efficient than their C code equivelents.
Truth 1a: For any function that would have used a C function taking a structure as a parameter to operate on, the C++ member function call will be 100% identical to the C function call in EVERY way. The only rule is that the structure will be the FIRST parameter passed and will be invisible to the coder. (virtual function will be discussed later)
Truth 1b: Simple inline Get/Set function that do not do anything other than the C code they replace (such as node = newNode will ALWAYS be replaced (if this is not turned off in the compiler) and will become identical to the C code, because the assignment or read is just as short as the function call, and if the assignment is itself a function it will obviously be called directly, because it's call(the copy function) will inheirently be more efficient than actually calling a function(the get/set) that then calls it.
Myth #2: There is such a thing as strait C++ that can in someway be worse than strait C (not assuming a conmpiler flaw). C++ includes C, and does not mandate that 1)thou shalt not declare thine variables as global. Nor even 2)thou shalt not access any member variables directly.
Truth 2a: It is perfectly acceptable to use structs in C++, which are simply classes who's members defualt to public instead of private. Also, any struct or class can have as many public, private, or protected members as you want, be they functions or variables.
Truth 2b: C++ even provides means to mix and match use of iostreams and C style io buffers (which I cannot imagine wanting to do unless you are converting a large C program to C++ and must do it in stages).
Myth #3: C++ is/or is not object oriented.
Truth 3a: C++ is a language that can be used with many methodologies including,but not limited to, OOP. It provides direct support for the most common of these: classes, objects, generalization(inheritence),encapsulation(private members and access functions),polymorphism(virtual functions).
Truth 3b: C++ has other distinct advantages over C (although many BUILD upon the OOP groundwork): generic programming support(templates), exception handling support(try,throw,catch), functional programming support(predicates), namespaces, and a VASTLY improved standard library (iostreams, strings, containers, generic algoritms, numeric classes, standard exception classes).
Myth #4: OOP is always better than non-OOP, and OOP must be used all or nothing to gain this benifit.
Truth 4a: I have yet to see a real world C++ program that does not have stand alone functions. Although some OOP "purists" attempt to encaplulate every global piece of data and every control function into a class heirarchy, they are obviously behaving irrationally (unless they need to be able to substitute different applications into a common framework) becuase at some level you have to realize the PROGRAM itself is the root object, and there is no reason not to allow it to have it's own data and function members.
Myth #5: C++ and or OOP features are free.
Truth 5a: I mentioned above that using classes and Get/Set functions can be done with ZERO performance penalty. But that is not the same thing as saying ALL C++ features are free. Virtual functions add size(see below for benifits), RTTI adds size AND reduces speed(but allows things to be done that are otherwise impossible), Templates can be HUGE space wasters (most often when instantiated with various types of pointers), Safe arrays (and string classes) slow down a program but they make it more robust.
Myth #6: C++ can only hope to be as good as efficient as C, never more so.
Truth 6a: Although there is some truth in this, because everything in C++ could be translated to an identical, but convoluted C program, this is like saying nothing can be more efficient than machine language...of course not. This statement though usually implies that standard C++ solutions to a problem are never more effiecient than their standard C counterparts. This is false. Within most areas of programming there are classic tradeoffs, the most notable is size vs. speed. I have often heard that anything that can be done with virtual functions can be done better in C using a switch statement. This is a simple size vs. speed issue: virtual functions spend size (one pointer per object for each vtable it uses, plus one pointer per function but they get constant time access for the function call, the switch implementation spends less size(usually one byte per object) but it has linear time growth (the worst you would EVER implement for anything). In addition to getting the speed advantages of virtual functions, they also allow for client side code to be written only once, even if new types are added late in the project's life. The C version must find EVERY switch statement and change the code.
I just realized how long this post is (and how much longer it would need to be to really explore this issue), so i'm only going to add one more thing.
Get and Set function actually DO serve a purpose (but realize this doesn't mean that their purpose and YOUR purpose are always the same, I often do not write them for simple utility structs), the encapsulation they provide allows you to devise a better method for storing things internally and, as long as you can still convert to the older format, client code will not have to change at all (note the theme...both polymorphism and encapsulation work together to manage change). This was VERY obvious when I worked on a simple 2D physics engine where parts of the code assumed vectors were in terms of DeltaX and DeltaY, but other parts assumed they were in terms of Direction (angle) and Magnitude (distance/force). We easily determined that our code ran faster when stored in Delta(we don't know a name for it) form, but certain algorthms (AND the user interface) wanted everything in the other form. So we wrote a class and provided Get/Set function in both forms, but stored it internally only in the Delta form.
Good Luck.
-Xai (cause I'm sure my name is WAY off the top of your screen
[This message has been edited by Xai (edited October 17, 1999).]