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!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn12feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail From: "James Giles" 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.2800.1478 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 Message-ID: Date: Tue, 11 Jul 2006 07:30:59 GMT NNTP-Posting-Host: 12.72.112.44 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1152603059 12.72.112.44 (Tue, 11 Jul 2006 07:30:59 GMT) NNTP-Posting-Date: Tue, 11 Jul 2006 07:30:59 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:5605 comp.lang.fortran:11925 comp.lang.pl1:1975 Date: 2006-07-11T07:30:59+00:00 List-Id: adaworks@sbcglobal.net wrote: ... > [...] However, since the compiler will emit a warning > about variables that have never been assigned a value in an algorithm > that tries to use it, no harm is really done since the careful > programmer will not release a program with warnings in it. It's not always possible to detect that at compile time. The execution of the code may depend on input data. I'm guessing that your implementation emits a warning if it detects that a *possible* control path includes a use without a previous definition (that's presumably why it's a warning and not fatal). Nor is initialization a very good solution. Well, unless you have a value you can initialize with that's obviously wrong (that's why IEEE has NANs). Initializing with an arbitrary plausible value often conceals errors and leads to plausible wrong answers. I still remember many cases where people developed a code in an implementation that always set all of memory to zero, but subsequently move to an implementation that did not. When their code crashed they wanted to know how to get their new implementation to clear all of memory so they could get their old "correct" answers. I've seldom seen cases of this where the old answers were really correct. Runtime testing can be expensive. But there are cases where it's the only reliable way. -- J. Giles "I conclude that there are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies." -- C. A. R. Hoare