From: Agamemnon Newsgroups: alt.comp.lang.learn.c-c++,comp.os.msdos.djgpp Subject: Re: Which is best? C or C++ ??? Date: Sun, 07 Dec 1997 22:23:54 -0500 Organization: All USENET -- http://www.Supernews.com Lines: 58 Message-ID: <348B684A.7D07@bigfoot.com> References: <348a15e5 DOT 826895 AT news DOT clear DOT net DOT nz> Reply-To: ewmiller AT bigfoot DOT com NNTP-Posting-Host: 15020 AT 204 DOT 137 DOT 153 DOT 118 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Glenn Reed wrote: > > Hi, > > Can someone break through all the hype for me. Which is the better > language C or C++? I suppose I should qualify it. > > 1. Some people say that C is more efficient than C++ but does this > still matter with the faster computers, eg 486s, Pentiums. How much > more inefficient is it? > > 2. The claim is also that it reduces runtime bug hunting. However > I've noticed that C++ is also more complex and executes code hidden > behind the scenes. eg. constructors, destructors, > operator-overloading. Are the runtime bugs just manifesting in > different ways? > > 3. Perhaps the only legitimate claim and that it is written with > large project development in mind so it makes the concept of > interfacing more straightforward. Multi-person programming projects > might have less bugs at the interface level because the interface is > much more well defined???? > > 4. Most code (particularly with the DJGPP projects) seems to be > written in C these days, and fewer stuff written in C++. Is this > because of the GPL license stuff or because it is harder and more > difficult (and hence takes a lot more time) to write in C++. > > Any comments? > > Glenn. > -------------------------------------------------------------- > E-mail: g DOT reed AT clear DOT net DOT nz > > Postal: 109 Burns St, > Cambridge > New Zealand. > -------------------------------------------------------------- Which is better is determined by what problem you are attempting to solve. If could just be that neither C nor C++ is the answer. To try to argue this either way would be like trying to decide which is more useful, a hammer or a screwdriver, with no more information than what I have just provided. I am not sure I agree with the points you have presented concerning efficiency (which is as much a function of the programmer as the language), executes code hidden behind the scenes (except for the simplest classes, the programmer provides the code for the constructor and destructor), reduces runtime bug hunting (again a function of the programmer more than the language), and most code seems to be written in C these days (I am not sure you or I have the necessary data to make this claim or its compliment but I would bet that it you are using a Windows machine, you are using an awful lot of C++ code.) regards, ag -- "Is this the face that launched a thousand ships?"