Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!sunroof!hammondr From: hammondr@sunroof.crd.ge.com (Richard A Hammond) Newsgroups: comp.software-eng Subject: Re: bridge building (was Re: Documenting OO Systems) Message-ID: <19295@crdgw1.crd.ge.com> Date: 6 May 91 15:43:09 GMT References: <1259@grapevine.EBay.Sun.COM> <9105012313.AA23259@enuxha.eas.asu.edu> <33846@mimsy.umd.edu> <9105020234.AA01202@enuxha.eas.asu.edu> <19167@crdgw1.crd.ge.com> <9105051741.AA27297@enuxha.eas.asu.edu> Sender: news@crdgw1.crd.ge.com Distribution: na Organization: General Electric Corporate R&D Center Lines: 42 In commenting about the AT&T error I wrote: As far as a language that supports "software engineering prnciples", I fail to see how this would help in this case. The error was inside a single module. In article <9105051741.AA27297@enuxha.eas.asu.edu> koehnema@enuxha.eas.asu.edu (Harry Koehnemann) replies: >My point is that, if proper techinques are strictly followed, errors >are less likely and IMO C does not support them very well. Things like >encapsulation and ADTs, separating specification from implementation, >packaging, private sections, parameter modes, overloading, a powerful >typing mechanism, etc. allow a programmer to express more information >to a compiler and allow it to catch more 'this is a stupid thing and I'm >not going to let you do it' errors. This is not very well supported in >C. Granted it can be done, just like that error could have been written >in Ada, but it is much more work and IMO it is not as likely to happen. All these are good things that Ada does, but they don't apply to the specific bug in question. The bug wasn't 'stupid' in that one could very easily really want the program to have control flow as specified. >However, it has been rather interesting watching people run to C's >defense :). Hell, it all started out as a joking comment anyways. You're wrong, I am not defending C, I am against the following logic: Premise 1: Ada supports Software Engineering better than C (I agree) Premise 2: AT&T switching code was written in C (I agree) Premise 3: AT&T switching code had a 'bug' (I agree) Conclusion: the bug would have been prevented by using Ada. (doesn't follow) If the bug had been an argument type mis-match error or some other interface error I would accept that Ada could have prevented it. But, as far as the actual error involved, it was one that put a break statement in a logically incorrect but syntactically legal location. Ada wouldn't have prevented this. Without the actual code fragment in C and what it should have been we can't even say that Ada would have made it mroe difficult. Cheers, Rich Hammond