brad wrote:
>
> I chose to learn C++ because of the options it provides... the
> complexity that you refer to. I can do old-fa****oned C, OOP,
> sequential, functional, etc. I can do char arrays or use strings.
> I'm
> proficient in Python and Ruby and I like them very much, but there
> are times when I need native, compiled code for performance and
> efficiency reasons... when that happens I normally use C++ in a C
> like manner. C++ does not force me into a certain programming
> paradigm. That's what I like most about it. I don't think it is a
> better C, IMO it's C with more options... use them if you like, but
> you don't have to... and if you do not need the additional options,
> then just stick with C. They are so similar that it's not really
> worth arguing about.
Note that function prototypes, which were a significant hole in C's
strong typing [1], originated with C++.
Hypothetically, if I were going to program in C++-like C, I'd still
use cl***** to provide data-hiding and encapsulation, but I'd do
without (at least)
* operator overloading
* virtual functions
* virtual base cl*****
* templates
Am I leaving anything out?
1. This isn't just a theoretical opinion. I used to work on a very
large suite of C applications, and invalid parameter types were a
common source of errors, particularly where they were "close enough"
on the platform we were developing on, but not on some of the ones we
****ted to.


|