comp.lang.ada
 help / color / mirror / Atom feed
From: chewy@apple.com (Paul Snively)
Subject: Re: problems/risks due to programming language, stories requested
Date: 28 Feb 90 18:57:58 GMT	[thread overview]
Message-ID: <6960@internal.Apple.COM> (raw)
In-Reply-To: BILL.90Feb27143004@hcx2.ssd.harris.com

In article <BILL.90Feb27143004@hcx2.ssd.harris.com> bill@ssd.harris.com 
(Bill Leonard) writes:
> In article <9790@medusa.cs.purdue.edu> gb@cs.purdue.EDU (Gerald 
Baumgartner) writes:
>            Again it looks like this bug wouldn't have occurred in another
>            programming language.
> 
> I can't resist saying that this last statement seems to me to be utter
> nonsense.  What programming language (read, compiler) can read the
> programmer's mind and tell what he meant?  The use of the "break" 
statement
> was a logic error (actually, it sounds like it was a lack of knowledge of
> the language, since "break" does not apply to "if").  I can't imagine a
> programming language that could discern this type of error.  [If I use
> WHILE instead of IF, for instance, I can expect some things to work and
> some not.  Yet I seriously doubt any compiler could possibly detect this
> error.]
> 
> I certainly think programmers often choose an inappropriate language, 
but I
> shy away from anecdotal stories like these because they seem (to me) to
> spread a lot of misinformation.  Unless you implement a project in 
multiple
> languages, it is nothing more than a guess to say what would have 
happened
> if the project had been implemented in some other language.  Perhaps you
> would have discovered an even more serious flaw in that language, or you
> might simply find it was no better or worse than the one you chose, just
> different.
> 
> Most of the stories I have heard along these lines all struck me as 
missing
> the point: how well was the program tested?  Were there code reviews?
> Design reviews?  All of these techniques are proven to reduce errors.  
Most
> of the errors in these stories (e.g., the infamous dot-versus-comma one)
> should have been found with even rudimentary testing.
> 
> Use of an inappropriate language is no excuse for abandoning other 
techniques
> of good software engineering.

I don't think that anyone's claiming that it is an excuse; I believe the 
point was that some languages applied to some tasks lend themselves to 
error more than another language applied to the same task.  If you wish to 
interpret the above story as a rather pointed jab at the C programming 
language, and object to C being treated that way, that's fine, but please 
just say so.

For what it's worth, my personal opinion is that C lends itself to 
precisely the kinds of errors noted above--when does break work and when 
doesn't it, and why in God's name do you need it in switch statements in 
the first place, etc.  I believe that it's C's historical looseness that 
is simultaneously its greatest weakness, when it leads to errors like 
this, and its greatest strength--C doesn't restrict you; C is mean and 
lean; C is close to the hardware; real programmers use C; even, God help 
us, C is the only language you need!  We all know C programmers whose 
machismo is thus huffed and puffed up (another of my personal opinions is 
that the per capita arrogance of C programmers far outweighs the per 
capita arrogance of any other language-aficionado group).

Now to get back to the important point: what language would have been 
better for the task in question?

Well, I hate to say it, but it's extremely unlikely that such an error 
would have been made in Pascal, since Pascal doesn't require you to 
explicitly break from case...of constructs.

Before the flames start, let me just add: no, I don't necessarily prefer Pascal over C for all tasks.  I generally attempt to choose the right tool for the job, rather than falling into the "when all you have is a hammer, everything looks like a nail" trap.

Standard Disclaimer.

  reply	other threads:[~1990-02-28 18:57 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-02-20 22:28 problems/risks due to programming language, stories requested Gerald Baumgartner
1990-02-21 16:49 ` Richard A Hammond
1990-02-21 20:15   ` problems/risks due to programming language William Thomas Wolfe, 2847 
1990-02-21 22:49     ` Richard A Hammond
1990-02-21 23:14     ` John F Nixon
1990-02-22  5:39     ` Scott MacHaffie
1990-02-22 20:13       ` William Thomas Wolfe, 2847 
1990-02-23 17:32         ` Richard A Hammond
1990-02-25 20:23           ` David Kassover
1990-02-22 20:48       ` Jeff Lawhorn
1990-02-23  2:00       ` Douglas Miller
1990-02-22 16:05         ` Dan L. Pierson
1990-02-22 20:28           ` David Kassover
1990-02-24 19:52           ` Erland Sommarskog
1990-02-23 17:45         ` Mike Harrison
1990-02-27  2:02           ` Douglas Miller
1990-02-22 18:28     ` Mike Percy
1990-02-23  2:09     ` Douglas Miller
1990-02-22  0:25   ` problems/risks due to programming language, stories requested David Kassover
1990-02-22  3:42     ` Richard A Hammond
1990-02-22 16:08       ` David Kassover
1990-02-22 16:21       ` David Kassover
1990-02-23 18:11 ` Thomas Vachuska
1990-02-24  0:13 ` Mark Brader
1990-02-27 19:30 ` Bill Leonard
1990-02-28 18:57   ` Paul Snively [this message]
1990-02-28 21:35     ` Jason Coughlin
1990-03-01 19:00       ` Barry Margolin
1990-03-02 13:31         ` Richard A Hammond
1990-03-02 19:26           ` William Thomas Wolfe, 2847 
1990-03-02 22:19             ` Richard A Hammond
1990-03-06 21:54               ` John Boone
1990-03-03 20:18             ` Charles E Eaker
1990-03-03 21:11               ` Invalid analogy William Thomas Wolfe, 2847 
1990-03-03 23:26                 ` I Wish
1990-03-05 19:51                 ` John F Nixon
1990-03-09 17:20                 ` Tony Sanders
1990-03-01 15:33     ` problems/risks due to programming language, stories requested Jeff Dalton
1990-03-01 21:42       ` Chuck Lins
1990-03-02 19:19     ` David F. Carlson
1990-03-02 22:15       ` William Thomas Wolfe, 2847 
1990-03-06 10:11         ` jbaker
1990-03-08 15:19           ` Lou Steinberg
1990-03-08 21:44             ` Gianfranco Ciardo
1990-03-09 16:18               ` David Kassover
1990-03-09 16:55               ` Erann Gat
1990-03-10 17:50               ` Andrew P. Mullhaupt
1990-03-12  4:06                 ` Peter da Silva
1990-03-12 16:58                 ` Jeff Clark
1990-03-12 20:20                 ` Proposal comp.lang.jihad (was Re: problems/risks due to blah etc.) What`s in a name?
1990-03-09 20:13         ` problems/risks due to programming language, stories requested Tony Sanders
1990-03-13 22:11           ` Erland Sommarskog
1990-03-19  1:01           ` Ada vs C, objectivity requested Lucio de Re
1990-03-26 20:37             ` Karl Heuer
1990-03-15 15:31         ` problems/risks due to programming language, stories requested jaws
1990-03-02 23:27       ` Jim Giles
1990-03-03  2:23         ` Vincent Manis
1990-03-03  2:10       ` problems/risks due to programming language Karl Heuer
1990-03-02 23:01     ` problems/risks due to programming language, stories requested William J. Bouma
1990-03-14  4:46     ` Lindsay Groves
  -- strict thread matches above, loose matches on Subject: below --
1990-03-16  9:38 vanavermaet
replies disabled

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