- Function overloading Not really needed, if the functions are different you just describe the diference in its name.
- Operator overloading Dangerous specially when combine with the myriad of C++ "features".
- Templates Hard to program correctly (past trivial stuff), hard to debug. Actually I had more success debugging data structures purely defined in macros than templates lol.
Gotta disagree on all these points.
For instance,
function overloading is awesome because it decouples the interface from the implementation. A complex number in C++ can call a function named sin() which accepts a complex number and properly calculates the complex sin. This is provided through the standard template library. So from a scientific programming standpoint, C++ is superior because the formula written on the page can be transcribed into much more readable code. In C, complex numbers are a hot mess.
Operator overloading is not dangerous. Again, the disciplines of science and math use operator overloading in their very notation! We use the + and - sign for scalar, vector, and matrix addition. So C++ facilitates what has already existed in mathematical notation for centuries. I will agree that indiscriminate operator overloading can be inappropriate (such as making the + operator perform division), but that boils down to the same thing as giving a misleading name to a function.
Templates can be tricky, but if you find yourself writing a big one, then why not consult the standard template library first? You can probably incorporate one of those through inheritance, containment, or some design pattern and save yourself a ton of time from reinventing the wheel. Templates provide all the advantages of macros along with being type-safe. And no, macros are not easier to debug than templates. Good luck figuring out the error when that 25-line macro gets expanded into the middle of an if statement!
All of the above concepts can provide clear benefits even for non OO-aware programmers.
Furthermore, C++ has one more biggie over C: the reference. In C every pointer dereference "->" is a ticking time bomb. The reference in C++ allows all of the low level detailed modules to assume that they are dealing with objects directly and eliminates the need for pointer dereferencing. Thus any pointer bugs will rear their heads either at compile time or in a very high level module of the C++ code.