From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 26 May 93 15:29:59 GMT From: seas.gwu.edu!mfeldman@uunet.uu.net (Michael Feldman) Subject: Re: XX(PL/I) to Ada translator/lessons learned Message-ID: <1993May26.152959.22778@seas.gwu.edu> List-Id: In article <1993May26.070218.5567@sctc.com> stachour@sctc.com (Paul Stachour) w rites: [other good stuff deleted] > >Well, not quite true. As an experiment, I translated the same >PL/I code into Ada. Yes, it was still a little wierd. Not as >bad as the C, but still weird. So I compiled the code (no error >messages), and ran a few test-cases. Bamb! Took an exception >(arressing outside the bounds of an array) on the first test. > >Analysis time. Yep, the code is "coincidentally correct". >The element of the array that's out-of-bounds is combined >with other data in such a way that it never affects the >results of the computation. > >But, it is a lurking boundary condition just waiting to happen. >Some day, with some compiler, it'll lay out the data-structures >to put that "wrong element" in the next page of memory, which >my program doesn't own. And then it won't be a benign error; >it'll be a real failure. > I KNEW there was a good reason to hate Ada, but I couldn't put my finger on it till now. It's all that DAMN run-time bounds checking! Wouldn't you rather not have known about this? After all, the crash would probably have occurred on someone else's watch... :-) :-) :-) (Oh, what the hell. Just use pragma SUPPRESS...) Mike Feldman ------------------------------------------------------------------------ Michael B. Feldman co-chair, SIGAda Education Committee Professor, Dept. of Electrical Engineering and Computer Science School of Engineering and Applied Science The George Washington University Washington, DC 20052 USA (202) 994-5253 (voice) (202) 994-5296 (fax) mfeldman@seas.gwu.edu (Internet) "The most important thing is to be sincere, and once you've learned how to fake that, you've got it made." -- old show-business adage ------------------------------------------------------------------------