From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200309130138.h8D1cCj15005@augusta.math.psu.edu> To: 9fans@cse.psu.edu Subject: Re: [9fans] g++ In-Reply-To: Your message of "Fri, 12 Sep 2003 13:12:50 EDT." From: Dan Cross Date: Fri, 12 Sep 2003 21:38:12 -0400 Topicbox-Message-UUID: 341edaee-eacc-11e9-9e20-41e7f4b1d025 Brantley Coile writes: > > In order to degrade the quality of this thread--or is it > to overload it?--does anyone have any current statistics on > the real use of C++ vs. C (or anything else)? This may be > one of the few forums that are both informed and likely > to accept the truth regarding C++. I can't sling any numbers, but I think C++ has its place. I currently pay my rent by slinging C++ code around; *I* don't really like it, but times are rough and it's a way to make a living (of course, so is being a two-bit nuckle buster for a loan-shark...). That said, I think there are good reasons to prefer C++ over C sometimes. The existence of the STL is a good one; I don't want to have to waste my time building basic data structures and algorithms in C, and I find the STL implementation less cumbersome than any general purpose C library I've found so far. Certain things, like exceptions, can be nice to have in large applications. Personally, I'd rather just bite the bullet and program in C++ than add all this stuff to C. I think it's terrible that, e.g., Doug wants to put exceptions et al into C; if you already need them, use another language. > I thank my Deity that I've avoided C++ so far. You're a luckier man than me, I suppose. But I'd point out that a programmer can write bad code in any language. The fact that there's more bad code in C++ than in C (I'm not sure I agree with that) might just be a function of their being more C++ code out there than C code. It's also likely a function of two other things; the ability of C++ to `handle more complexity' (which, though intended to reduce complexity, usually doesn't), and because in order to write maintainable C++ code, the programmer has to be really, really disciplined, and most aren't. - Dan C.