From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public X-Google-Thread: 10d15b,d730ea9d54f7e063 X-Google-Attributes: gid10d15b,public X-Google-Thread: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public From: Craig Franck Subject: Re: C is 'better' than Ada because... Date: 1996/08/20 Message-ID: <4vbcba$kt8@mtinsc01-mgt.ops.worldnet.att.net>#1/1 X-Deja-AN: 175225703 references: <4 <4vb399$kt8@mtinsc01-mgt.ops.worldnet.att.net> <4vb5st$b5r@krusty.irvine.com> content-type: text/plain; charset=us-ascii organization: AT&T WorldNet Services mime-version: 1.0 newsgroups: comp.lang.ada,comp.lang.c,comp.lang.cobol x-mailer: Mozilla 1.22ATT (Windows; U; 16bit) Date: 1996-08-20T00:00:00+00:00 List-Id: adam@irvine.com (Adam Beneschan) wrote: >Craig Franck writes: > > >The point I was tring to make is you can write bad code in any > >language. Good programmers and software support are as important > >as the language. Puting training wheels on a language by being > >able to write : FOR I IN Data 'RANGE LOOP > > Put(Data(I), 3); > > END LOOP; > >because programmers can't count, may be helpfull. > >I haven't been following this "Thread That Will Not Die", so maybe I >don't understand the context in which this statement occurs. > >It seems to me, though, that the poster is referring to 'RANGE as >"training wheels" designed to protect inexperienced programmers from >accidentally typing the wrong loop limit. This is ridiculous and >shows a complete lack of understanding of software engineering >principles. The whole purpose of 'RANGE, 'FIRST, 'LAST is for >*maintainability*. It's there so that if you later decide to change >the bounds of Data, you can do so in ONE PLACE (the place where Data >is declared) without affecting the correctness of the rest of the >program. "Training wheels" was a poorly chosen phrase. The fact that a language would have built in support for not running past the bounds of an array should not be cause for belittlement. Perhaps "guard rails" would have been better. And yes, programmers can count -- but what it is they are counting can change. I still find the syntax for attributes strange. > I've been programming for 20 years, 8 years >in Ada, and I would ALWAYS use the 'RANGE construct that this poster >denigrates. It is *not* a "training wheel." Though Pascal was designed to stop inexperienced programmers from shooting themselves in the foot, Ada is not Pascal. Craig ----- clfranck@worldnet.att.net Manchester, NH There are no electrons...