comp.lang.ada
 help / color / mirror / Atom feed
From: kassover@jupiter.crd.ge.com (David Kassover)
Subject: Re: problems/risks due to programming language, stories requested
Date: 22 Feb 90 00:25:34 GMT	[thread overview]
Message-ID: <5458@crdgw1.crd.ge.com> (raw)
In-Reply-To: 5432@crdgw1.crd.ge.com

In article <5432@crdgw1.crd.ge.com> hammondr@sunroof.crd.ge.com (Richard A Hammond) writes:
>In article <9790@medusa.cs.purdue.edu> gb@cs.purdue.EDU (Gerald Baumgartner) writes:
>
>>For a research project I am collecting information about the risk of
>>choosing the wrong programming language. In particular I am looking
>>for problems that could have been avoided if another (a better)
>>programming language would have been used.
>
>>I know of these three such stories:
>	...
>>     3. The AT&T breakdown a month ago was caused by a break statement
>>	in C. See the following mail (multiple forwarding headers deleted):
>
>What other programming language?  Only one without any GOTO or restricted
>GOTO (e.g. exit, break, ...).  This leaves out Ada!!!!!!
>
>Similar bug in Ada: 	(Cut down for posting, but gives the flavor)
>
>In my limited experience the cases where Ada is introduced into a
>programming environment also introduce lots of other good software
>engineering practices.  For example, lots of people I know who
>program in C don't use LINT.   I view it as a deficiency of management
>and not of the language that they don't use available tools.
 
OK.  First, I apologise for mis-representing the "classic"
FORTRAN goof  (There's one that's actually ambiguous to the
compiler, involving FORMAT statements and Hollerith constants,
but I can never remember it)

Now, AT&T breakdown:
 
You show how this could happen in Ada.  Ok, it could.  But ada
allows one to "name" loops, and use those names in exit
statements, especially useful when you want to break out of an
inner and an outer loop.  In your example, you didn't do so,
since the C code could not.  But you could have.
 
Looking back at the last 20Klines of Ada I've written recently,
I've used named loops roughly twice.  Specifically to avoid
ambiguity to me when I look at the code, but it helps make sure
I did it right, too.
 
You go on to bemoan the lack of use of LINT.  I submit that,
since we're not dependent on underpowered pdp9's or 11's anymore,
then LINT should be built into the compiler, or there as the
default option  (to be turned off at the user's risk)

And onward, to problems that are exacerbated by the language.  

Time and again, my C development people spend oodles of effort
tracking down something that ends up being resolved by
discovering a header file that was changed, but not *all* of the
dependent code was recompilied.  Use make, you say?  Sure, but
someone's got to write the make script, whose language is no gem,
either.
 
Ada's insistence on specification recompile (and lack of a
include processor) cause the dependency tree to be built and
modified automatically.  (in Vax ada, you can enter "foreign
language" object modules into the library, so they, too, can
participate in obsolescence analysis.  I don't know if anyone
else provides this, or how well it works)
 
 
On a par in terms of frequency with the above is the case of the
non-catchalled case statement.  In ada, if you have a case
statement of an enumerated type, and you do not provide a case
for every member of the type or a when others => clause, the
compiler signals an error.  No, this doesn't stop someone putting
a when others => null; in, but most of us either use the compiler
to remind us to put in an appropriate case or cause a fatal error
to occur in the catchall, the theory being that it will blow up
in testing, and the appropriate case added.
 
Finding this thing in C is a bear, especially when, if your code
is like mine, three quarters of it is conditional compile based
on flags set in a header file somewhere.
 
And just as a final note:  I have demonstrated many times that it
is possible to write FORTRAN in Ada.  About the only places I
haven't been able to do so, if I really wanted to, have been APL
and assembler.  That doesn't mean that either Ada or FORTRAN are
valueless. 

  parent reply	other threads:[~1990-02-22  0:25 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   ` David Kassover [this message]
1990-02-22  3:42     ` problems/risks due to programming language, stories requested 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
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