🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #1994

Re: Should I learn C or C++ first?

#1994
From: Peter Hinz
Date: Fri, 18 Aug 1995 06:27
58 lines
3279 bytes
In <1995Aug16.205658.59134@cc.usu.edu> slmyv@millville.declab.usu.edu (Denys Larry) writes:

>But I don't think the final chapter
>has been written in the analysis of C++.

Not by a long shot, I've just started my analysis. :)  Ok, here is what
I've done:  I took a C and a C++ version or a SPLASH benchmark program 
(Barnes-Hut) and run it on my parallel computer simulator.  What
I found was quite unusual.  People always told me C++ is slower
then C, because .... (List at least 20 remarks), well I found the
C++ version to be faster.  I've also done it with another program
called WATER.

Well basicly what I wanna say is:  C++ can be just as fast as C,
and MY (note I say my) experience has shown that C++ code is
faster to write and easier to maintain.  Well I guess I'm an
OO junky.

>  Hype, in the computer industry, has a way of building on itself.
>While I am not going to cry any tears for the advocates of Eiffel and
>C+@ and their opinion that their cherished languages have been steam-
>rolled by the C++ express train, I do think they have a valid point
>that the industry is too obsessed with C++ to give their languages
>a fair shake.  But, pehaps, Eiffel will probably have it's time in the 
>sun sometime in the future.

Jup, the industry is obsessed with C++, but the question is why?
I think because it was obsessed with C before and for most
people out there C++ is just C with some extra goodies.

>  As quality and maintenance of C++ code, I think it's a mixed bag.
>I do think that the worst, convoluted C++ code is far worse to work
>with than the worse, convoluted C code.  For some naturally object
>oriented problem domains, C++ code would be clearly superior than
>trying to kludge object oriented properties into C.  For most problem
>domains, I don't think there is much of a difference.

I say, select the language that suites the task at hand.  If the thing
can be coded in Basic (and is fast enough) then my all means do it.
I find myself swapping between C and C++ everyday or so.

>  I'd believe 2:1 for some types of programming.  But this thread is
>also running in rec.games.programmer (where I responded to it), and 
>since that group is mainly concerned about programming low-level
>graphics routines, I don't believe a 2:1 improvement for that kind of
>programming for one second.  Most of the problems discussed in that
>group are about as un-object oriented as you can get.

That kind of improvement, no way.

Till later
Peter

--
Peter Hinz             | Cerebus Software, knows what I do!
peter@cs.uct.ac.za     | Note: Windows is NOT a virus, Viruses do something!
University of Cape Town| One in a million things happen nine times out of ten.
Mosaic: "http://www.cs.uct.ac.za/PeopleInCompSciDept/peter/index.htm"
Technical Details
Message-ID: <411bsn$qs8@ucthpx.uct.ac.za>
Path: arc1-ca.pugleaf.net!casper.cs.uct.ac.za!peter
References: <3v6qkj$8ak@news1.best.com> <3v713f$2bd@ixnews6.ix.netcom.com> <1995Aug16.145426.8003@ohstpy> <1995Aug16.205658.59134@cc.usu.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!casper.cs.uct.ac.za!peter
From: peter@cs.uct.ac.za (Peter Hinz)
Newsgroups: rec.games.programmer,comp.lang.c++
Subject: Re: Should I learn C or C++ first?
Date: 18 Aug 1995 06:27:35 GMT
Organization: University of Cape Town
Message-ID: <411bsn$qs8@ucthpx.uct.ac.za>
References: <3v6qkj$8ak@news1.best.com> <3v713f$2bd@ixnews6.ix.netcom.com>  <1995Aug16.145426.8003@ohstpy> <1995Aug16.205658.59134@cc.usu.edu>
NNTP-Posting-Host: cs.uct.ac.za