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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c4cb2c432feebd9d X-Google-Thread: 1094ba,c4cb2c432feebd9d X-Google-Thread: 101deb,15c6ed4b761968e6 X-Google-Attributes: gid103376,gid1094ba,gid101deb,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news2.google.com!atl-c05.usenetserver.com!news.usenetserver.com!peer01.west.cox.net!cox.net!newshub.sdsu.edu!newscon04.news.prodigy.net!prodigy.net!newsdst01.news.prodigy.net!prodigy.com!postmaster.news.prodigy.com!newssvr12.news.prodigy.com.POSTED!4988f22a!not-for-mail From: Newsgroups: comp.lang.ada,comp.lang.fortran,comp.lang.pl1 References: <0ugu4e.4i7.ln@hunter.axlog.fr> <%P_cg.155733$eR6.26337@bgtnsc04-news.ops.worldnet.att.net> <6H9dg.10258$S7.9150@news-server.bigpond.net.au> <1hfv5wb.1x4ab1tbdzk7eN%nospam@see.signature> <2006052509454116807-gsande@worldnetattnet> <1kzktalo9krea$.z8n9wev45xct$.dlg@40tude.net> Subject: Re: Ada vs Fortran for scientific applications X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Response Message-ID: NNTP-Posting-Host: 70.134.98.164 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr12.news.prodigy.com 1152639821 ST000 70.134.98.164 (Tue, 11 Jul 2006 13:43:41 EDT) NNTP-Posting-Date: Tue, 11 Jul 2006 13:43:41 EDT Organization: SBC http://yahoo.sbc.com X-UserInfo1: FKPO@MONTBWQR]TX\ZIBNFXBWR\HPCTL@XT^OBPLAH[\RZ]CDVW[AKK[J\]^HVKHG^EWZHBLO^[\NH_AZFWGN^\DHNVMX_DHHX[FSQKBOTS@@BP^]C@RHS_AGDDC[AJM_T[GZNRNZAY]GNCPBDYKOLK^_CZFWPGHZIXW@C[AFKBBQS@E@DAZ]VDFUNTQQ]FN Date: Tue, 11 Jul 2006 17:43:41 GMT Xref: g2news2.google.com comp.lang.ada:5624 comp.lang.fortran:11951 comp.lang.pl1:1991 Date: 2006-07-11T17:43:41+00:00 List-Id: "Tom Linden" wrote in message news:op.tci6xqiizgicya@hyrrokkin... On Tue, 11 Jul 2006 08:02:47 -0700, wrote: My comments were not restricted to PL/I, but apply generally to any compiler, and specifically Ada was intended. Since I had put in the scaffolding for producing the info in cross reference listings I also played with generating precisely the sort of warnings that you refer to, but found it generated too much "clutter" of questionable value. That was my view, FWIW > I think you are right about clutter in programs that contain a lot of global variables. For example, in a COBOL program, where the data is organized (pre-OOCOBOL) in a DATA DIVISION, these kinds of warnings would be clutter. In other languages with global variables the same would be true. I recall early Ada programs where the designers would create package COMMON is -- Fortran programmers package DATA_DIVISION is -- COBOL Programmers package COMPOOL is -- CMS-2 and Jovial programmers thereby thwarting the good programming practices available to them. However, when these kinds of messages are localized to the specific module to which they apply, they are quite helpful. This is especially true when the language separates the concerns of scope and visibility, as Ada does. We can know that an artifact in scope, is never referenced through a warning. From that warning we might ask whether we have that artifact at the right place in a program design. The above example of scope is not simply academic. I recall a very large Ada project, a weapon system of several million lines of code, where the compiler did not issue such warnings (in the mid-1980's) even though it could have. As a consequence, many packages were "with'ed" too early in the design. The programs worked fine, but those artifacts could have been brought into scope much later in the design (usually at the package body level instead of at the specification level) to improve compilation time and later debugging. When the group doing development finally realized this, they were able to move those artifacts to the correct level of scope. However, that early compiler failed to notify them, even though it could have been designed to do so. No modern Ada compiler would fail to take advantage of this capability. In part, it is Ada's package module and powerful separate compilation capability that helps make this a worthwhile feature of a compiler. Most modern languages, including Java and C++ fall short in this regard. Even Eiffel, a language I like a lot, does not support this kind of thing as well as I would prefer. If the warnings are "clutter," so be it. I don't like to release a program for production until the clutter is attended to. I would rather have the clutter than the unitialized variable, the inability to produce a program where every artifact was exactly where it needed to be, and the knowledge that I did not have formal parameters in a method that I forgot to use in the computation in that method. FWIW. Richard Riehle