Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!wuarchive!mit-eddie!rutgers!aramis.rutgers.edu!paul.rutgers.edu!emuleomo From: emuleomo@paul.rutgers.edu (Emuleomo) Newsgroups: comp.lang.c Subject: Re: Errors aren't that simple Message-ID: Date: 7 Mar 90 15:43:43 GMT References: <8192@hubcap.clemson.edu> <17000003@hpcvra.CV.HP.COM> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 32 In article <17000003@hpcvra.CV.HP.COM>, frankw@hpcvra.CV.HP.COM (Frank Wales) writes: > In some article (William Thomas Wolfe, 2847 ) > billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu writes: > >From ekrell@ulysses.att.com (Eduardo Krell): > >> And what makes you think the network wouldn't have crashed if the software > >> had been written in Ada (you seem to imply this)? Do you know the details > >> of the cause of the crash?. > > > The crash apparently was caused by a programmer who used a "break" > > within an if (which itself was within a switch) for the purpose of > > exiting the if; the real result was to exit the switch instead. If > > C provided a case statement rather than a switch..break system, then > > the error would most likely have been prevented. > > Well, actually, the crash was caused by software which didn't work Actually, I think the 'break' as used in the switch stmt was one of the few mistakes Dennis Ritchie made when designing the C language. By using 'break' both to end a 'case', and to exit a loop, he overloaded the meaning of 'break' and thus made it impossible to jump out of a switch that is embedded within a loop without using a flag or a GOTO! Was he trying to conserve keywords? In hindsight, I think 'endcase' would have been a better choice. The other less serious flaw in C is the do...while contruct. I kind of prefer PASCAL's repeat....until construct myself. Anyway, 1.5 flaws in a language is still pretty good. I have used several languages ( >15) and in expressive power, it is difficult to beat C. Thats why its fast becoming the lingua franca of programming. --Emuleomo O.O. (emuleomo@yes.rutgers.edu) -- ** The ONLY thing we learn from history is that we don't learn from history!