problems/risks due to programming language

William Thomas Wolfe, 2847 billwolf%hazel.cs.clemson.edu at hubcap.clemson.edu
Fri Feb 23 07:13:45 AEST 1990


>From machaffi at fred.cs.washington.edu (Scott MacHaffie):
>>   code associated with the else part.  Thus, we have an inconsistency
>>   in C's design: with one flow-of-control construct (the switch), it is
>>   necessary to use a dangerous GOTO to achieve normal processing, whereas
> 
> No, it is necessary to use a statement to indicate that the current case
> statement is finished...like an "end case" or the next "when => " in ADA.

   Such a statement already exists: either the next "case Value:", or 
   the } which ends the switch.  Why is it necessary to use a "break"?
 
>>   with a similar flow-of-control construct (the if-else), the default is
>>   reversed.  Given such a language design, it should not surprise anyone
>>   that programmers become confused, particularly when the constructs are
>>   being used together. 
> 
> Some programmers become confused -- good programmers, and software 
> engineers, don't.

   The problem cannot simply be defined out of existence by saying,
   in essence, that good programmers don't make mistakes.  All human
   programmers make mistakes, and a well-designed language will help
   to minimize this particular tendency.  In this case, C does not. 

>>   This is certainly true; Brooks and others have noted that the good
>>   software engineering practices which are routinely introduced in
>>   conjunction with the Ada language are responsible for more of the 
>>   resulting improvements than the fact that the Ada language was
> 
> Well, these practices are certainly NOT being introduced in the 
> universities (at least not here).

   In that case, I strongly suggest that you immediately bring 
   this fact to the attention of the software engineering faculty 
   at washington.edu.  At other universities (e.g., Clemson), Ada
   *is* introduced in conjunction with software engineering.


   Bill Wolfe, wtwolfe at hubcap.clemson.edu



More information about the Comp.lang.c mailing list