[NTLUG:Discuss] Evil C++ (was Re: Evil GCC-2.96)

Steve Baker sjbaker1 at airmail.net
Sat Jun 16 14:48:31 CDT 2001


Richard Cobbe wrote:

<snip long and interesting explanation with things like "Sapir-Whorf Hypothesis" in it>

> Therefore, the fact that C++ is immensely popular says NOT ONE THING about
> the quality of the language design, the quality of the language definition,
> or the quality of the implementations.

I didn't say it did.  We weren't talking about that.

None this has *any* bearing on the issue at hand.  English is an
immensely popular language - it's less logical than German, insanely
more complex than Esperanto, less fun than Klingon - and doesn't have
anywhere *near* enough words for "snow" if you are an Eskimo...but
none of that matters - it's still rapidly displacing every other
language on the planet.

This fact pisses off the French (who think their language sounds nicer),
the Eskimo's (who cannot use English to adequately explain why the
snow out there today is no good for for building Igloo's) and the people
who watch *way* too much StarTrek....but it's a fact none-the-less.

The same is true for C and C++.  The reasons for this may not be all
that logical (although I personally regard a language that has garbage
collection built in behind the scenes as a something that would make it
*utterly* unusable - certainly not a feature to be PROUD of!!).

None of this has *ANY* bearing on the subject of this thread.

The deal is that:

  1) RedHat did a bad thing with GCC 2.96 that adversely affects C++ users.

  2) Someone says "Well that doesn't really matter - who uses C++ anyway"

  3) I point out that it's the second most popular language in the very
     community who would be potential RedHat users.

  4) We get into a long and technical diatribe about whether it's a good
     language or not...which is IRRELEVENT to (1), (2) and (3).

C++ versus LISP, RedHat versus Debian, Pine versus Mutt and (especially)
vi versus Emacs are pointless discussions.

The bottom line is that the choice is a personal one and no amount of technical
arguments will change people's minds.

Ada is a good example.  I actually helped in the design process for Ada - but
I have to admit that although Ada is an improvement on C++, virtually *every*
programmer (myself included) who was forced into using it by the government
has run back to the comfort of C++ at the very first opportunity.  That may
not be a rational decision - but it happens none the less.

FWIW and IMHO, the reason people like C++ is the same reason that people
liked C.

1) It's quite close to the hardware.  You can understand what it's
   doing at the machine code level very easily.  That matters a LOT
   if you want your programs to run fast.

2) It's a jack-of-all-trades.  You can write everything in it without
   needing to learn a dozen different languages.

3) It's a pure superset of C - which is without doubt the most popular
   programming language in the history of computing - so people find it
   easy to convert.

LISP is OK for some things - but you certainly wouldn't write a flight
simulator in it (which is what I happen to do for a living). 

  Garbage collection makes for non-deterministic execution times
  and that's not something we can live with. LISP doesn't have
  OpenGL bindings - which makes it hard to write graphics in it,
  I have over a million lines of legacy C and C++ code to interface
  to...I could go on - but I won't.)

The fact is that I *also* use C++ for Artificial Intelligence in the games
I write for fun at home - when I'm fully aware that LISP is undoubtedly
a better choice for doing that.  But then, I don't want to have to learn
Eskimo just because I'm going on a skiing trip to Switzerland and might
need to describe the snow conditions to someone else in the Alps
who might happen to know Eskimo.  You wouldn't do that - and I don't
use LISP for AI.

CONCLUSION:
~~~~~~~~~~~

C++ is popular - that's all that matters in the context of RedHat's
poor decisions on which GCC version to go with.

----------------------------- Steve Baker -------------------------------
HomeMail : <sjbaker1 at airmail.net>   WorkMail: <sjbaker at link.com>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sf.net     http://tuxaqfh.sf.net  http://tuxkart.sf.net
           http://agtoys.sf.net   http://prettypoly.sf.net
           http://freeglut.sf.net http://toobular.sf.net



More information about the Discuss mailing list