Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!pacbell.com!att!ucbvax!ENUXHA.EAS.ASU.EDU!koehnema From: koehnema@ENUXHA.EAS.ASU.EDU (Harry Koehnemann) Newsgroups: comp.software-eng Subject: Re: bridge building (was Re: Documenting OO Systems) Message-ID: <9105051741.AA27297@enuxha.eas.asu.edu> Date: 5 May 91 17:41:50 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> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: koehnema@enuxha.eas.asu.edu (Harry Koehnemann) Distribution: na Organization: Arizona State University Lines: 43 (Richard A Hammond) writes: > BULL!!! Harry, the error has nothing to do with typing, strong or weak, it > was a syntax error, according to your description. In fact, the same > error could be made in Ada, i.e. using 'exit' out of an if statement > which is inside a loop, e.g. (formatted to line up parallel constructs) But it wasn't a syntax error or the compiler would have caught it, or at least warned about it. That's part of the point - a language should allow a programmer to convey as much information as possible. I agree the error could have happened in Ada, but is it less likely? Break is an integral part of C - you cannot write a switch without it. You don't need exit in Ada. When you teach an Ada class, do you mention exit or goto? Probably not - it's like showing a child where you store your gun. Therefore, if your not using it, it can't hurt you. > 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. 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. However, it has been rather interesting watching people run to C's defense :). Hell, it all started out as a joking comment anyways. > In fact, I strongly suspect that some of the Ada sucess stories I've > been hearing, on closer examination are examples of the Hawthorn effect, > i.e. management pays attention to what's going on and gets better results. Good point. Many claim that the largest benefit of this entire Ada thing will be that programmers will be forced to get training. While they're learning the language, they'll also be reinforced (or introduced) to some solid principles as well. Have a nice day.... Harry Koehnemann koehnema@enuxha.eas.asu.edu