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: 10d15b,d730ea9d54f7e063 X-Google-Attributes: gid10d15b,public X-Google-Thread: 103376,dab7d920e4340f12 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,dab7d920e4340f12 X-Google-Attributes: gid1014db,public From: Mike Roske Subject: Re: C is 'better' than Ada because... Date: 1996/08/21 Message-ID: <321AE6D8.41C67EA6@mailgw.sanders.lockheed.com>#1/1 X-Deja-AN: 175489114 references: <4 <4vb399$kt8@mtinsc01-mgt.ops.worldnet.att.net> <4vb5st$b5r@krusty.irvine.com> content-type: text/plain; charset=us-ascii organization: Lockheed Sanders mime-version: 1.0 newsgroups: comp.lang.ada,comp.lang.c,comp.lang.cobol x-mailer: Mozilla 2.02 (X11; I; SunOS 4.1.4 sun4m) Date: 1996-08-21T00:00:00+00:00 List-Id: Adam Beneschan wrote: > 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. > > Having the same information in two or more places in the program has > long been recognized as a major source of errors introduced during > maintenance. Exactly. And this same problem occurs in both C _AND_ Ada language programs. Ada gives you a nice way to avoid it, but engineers who write structured software will use preprocessor definitions in C to define _in ONE PLACE_ size (and other) information about data structures. Ergo, as both languages provide a mechanism to solve the single definition problem, neither is "better" in this category. -- *-------------------------------------------------------* * Michael Roske * Sanders, A Lockheed Martin Company * mroske@mailgw.sanders.lockheed.com * (603) 885-9240 *-------------------------------------------------------* * "I'd rather be flying RC..." *-------------------------------------------------------*