Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-pcd!hpcvra!frankw From: frankw@hpcvra.CV.HP.COM (Frank Wales) Newsgroups: comp.lang.c Subject: Re: Re: Errors aren't that simple Message-ID: <17000003@hpcvra.CV.HP.COM> Date: 2 Mar 90 23:12:10 GMT References: <8192@hubcap.clemson.edu> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 51 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 right. Deducing the reasons behind this are an interesting academic exercise, and may indeed point to language design problems, both for C specifically and other languages in general, but for me at least, I just note the problem as a potential difficulty in future programming, and get on with the job. I certainly don't slap myself on the forehead, exclaiming: "What a crock C is! From now on, I'm going to use instead!" Useful tools are hard to come by, and take time to master. I need a better reason than nit-pickety details to discard one and learn another. If someone came to me and explained a bug in a piece of software he'd written with: "well, if the semantics of C were different, it would have worked okay," he would be the proud owner of what my father would have called 'a swift kick up the arse'. Where I come from, software in *any* language is supposed to be tested. If you feel the need to put code in to handle something, you test that code. If it isn't important to make sure the code works right, you don't put it in. And this is *not* a C issue, this is a software development issue. You can write broken software in any language, regardless of its syntax, semantics or size (they tell me size doesn't matter, but...). Whatever the reason for the defects, putting software in service without fixing them is wrong. Can you tell me, Bill, that you *know* that if the semantics of C were different, that no other problems would have arisen as a consequence of the difference? [Note for language zealots: I am not attempting to defend the design of C here; it has its deficiencies, but it is still a useful language for many types of work. I believe it is the most pragmatic language of its time, and that the most pragmatic language of today is Eiffel. I don't think there is *any* language in which one can do useful work that doesn't also have cognitive pitfalls somewhere, including Ada. I'd like to see the language which guarantees working software without testing. I think it would give me a good excuse to shout "yippee!" for once.] -- Frank Wales, Guest of HP Corvallis, [frank@zen.co.uk||frankw@hpcvdq.cv.hp.com] Zengrange Ltd., Greenfield Road., LEEDS, England, LS9 8DB. (+1)-503-750-3086