comp.lang.ada
 help / color / mirror / Atom feed
From: alice!bs@ucbvax.Berkeley.EDU  (Bjarne Stroustrup)
Subject: Re: Ada and C++: A request for comparison/contrast/relative benefits
Date: 13 Aug 93 01:47:43 GMT	[thread overview]
Message-ID: <26292@alice.att.com> (raw)

Under the heading

	Ada and C++: A request for comparison/contrast/relative benefits

dewar@cs.nyu.edu (Robert Dewar @ Courant Institute of Mathematical Sciences) wr
ites

 > ah yes, and this thorough testing of the phone system by the public includes
 > we, the public, being kind enough to find the bug that brought down the AT&T
 > long lines for a period of time which was probably sufficient to exhaust the
ir
 > quota for downtime for the next hundred years.

referring to the infamous bug in a C program (assuming that it really was
a C bug, which I don't for a fact).

Two days ago one of the new Swedish JAS-39 Gripen fighter planes crashed
during a low speed demonstration flight over central Stockholm. The problem
was an error in the control system. That system is programmed in Ada. The
pilot ejected safely and amazingly only a few people were injured when the
plane hit the ground.

Assume for the moment that the assertions of a software failure that I
have heard are true. Does that mean that Ada is a bad programming language?
Does that mean that Ada programming is unsafe? Does that mean that I have
to express fear of dealing with ``gadgets'' programmed in Ada? Does that
mean I have to write to my congressman demanding the exclusive use of
another, safer, language for all critical applications?

	Of course not!

However, did I accurately describe a common thread of argument against C++
in this newsgroup?

	Of course.

On top of that, that common thread takes a problem with C and counts it as
a fatal flaw in C++. 

What catastrophic software induced failures, such as plane crashes and
telephone breakdowns, tells us is that no language is 100% safe and that
we can't rely 100% on any part of a system. the reliability of a system
depends on every part and ascribing an error to a particular part of the
total system is simply pin-pointing the error. The real responsibility
for the integrity of the system is in the people who produce the system
and not in any one part of the system.

Should this argument be taken to mean that safety of language constructs
is irrellevant? Not at all; we want to have our languages as safe as is
reasonable. Exactly as we want every other component in the system as
safe and reliable as is reasonable. However, we can decide where in the
system to spend our limited resources. Focussing exclusively on the
programming language - or any other individual part of the system -
is absurd.

Blaming a programming language for a specific systems failure, even a purely
software one is confusing the issue. We can make mistakes in any language.
We can write bad code in any language. We try not to and we try to choose
our languages with that in mind.

	- Bjarne

PS For solid information about C++ I recommend
  B.Stroustrup: The C++ Programming Language (2nd edition), Addison-Wesley
  B.Stroustrup: The History of C++, Proc HOPL2 Conf. ACM Sigplan Notices, Mar'9
3.
They don't compare C++ to Ada but they ought to be able correct some of the
misconceptions and hype that is floating around.

             reply	other threads:[~1993-08-13  1:47 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-08-13  1:47 Bjarne Stroustrup [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-08-31 17:09 Ada and C++: A request for comparison/contrast/relative benefits dog.ee.lbl.gov!agate!spool.mu.edu!darwin.sura.net!uvaarpa!software.org!sm
1993-08-21  5:30 Gregory Aharonian
1993-08-20 17:39 cis.ohio-state.edu!magnus.acs.ohio-state.edu!math.ohio-state.edu!cs.utexa
1993-08-20 16:17 cis.ohio-state.edu!math.ohio-state.edu!darwin.sura.net!source.asset.com!v
1993-08-19 20:11 Wes Groleau x1240 C73-8
1993-08-18 22:42 agate!spool.mu.edu!sol.ctr.columbia.edu!emory!europa.eng.gtefsd.com!darwi
1993-08-18 18:16 cis.ohio-state.edu!news.sei.cmu.edu!ajpo.sei.cmu.edu!progers
1993-08-18  3:10 news
1993-08-16 16:33 David Emery
1993-08-16 16:33 David Emery
1993-08-16 15:35 Wes Groleau x1240 C73-8
1993-08-16 11:23 news
1993-08-13 17:33 Mark A Biggar
1993-08-13  6:07 Bjorn Kallberg
1993-08-13  3:46 Michael Feldman
1993-08-13  3:40 Michael Feldman
1993-08-12 14:56 Robert I. Eachus
1993-08-11 20:46 Dave Griffith
1993-08-11 20:08 cis.ohio-state.edu!math.ohio-state.edu!usc!venice!gumby.dsd.trw.com!truff
1993-08-11 18:57 Wes Groleau x1240 C73-8
1993-08-11 16:55 Robert Dewar
1993-08-11 16:48 Tim Barrios
1993-08-11 14:14 david.c.willett
1993-08-11 13:37 Harry Erwin
1993-08-10 18:53 fred j mccall 575-3539
1993-08-09 18:35 cis.ohio-state.edu!math.ohio-state.edu!usc!venice!gumby.dsd.trw.com!truff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox