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!news2.google.com!atl-c05.usenetserver.com!news.usenetserver.com!peer01.west.cox.net!cox.net!p01!fed1read12.POSTED!53ab2750!not-for-mail From: James Dennett User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060516) MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.fortran,comp.lang.pl1 Subject: Re: Ada vs Fortran for scientific applications 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> <_5idnW0Lk4kxXS7ZnZ2dnUVZ_oOdnZ2d@comcast.com> <1hiayuk.4mm8dzknzt0nN%nospam@see.signature> In-Reply-To: <1hiayuk.4mm8dzknzt0nN%nospam@see.signature> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <24_sg.3412$lv.116@fed1read12> Date: Tue, 11 Jul 2006 20:33:18 -0700 NNTP-Posting-Host: 68.8.52.20 X-Complaints-To: abuse@cox.net X-Trace: fed1read12 1152675198 68.8.52.20 (Tue, 11 Jul 2006 23:33:18 EDT) NNTP-Posting-Date: Tue, 11 Jul 2006 23:33:18 EDT Organization: Cox Communications Xref: g2news2.google.com comp.lang.ada:5635 comp.lang.fortran:11966 comp.lang.pl1:2002 Date: 2006-07-11T20:33:18-07:00 List-Id: Richard E Maine wrote: > glen herrmannsfeldt wrote: > >> John W. Kennedy wrote: >> >>> (Java is the only language I know of that will actually fail the compile >>> unless it /knows/ that every variable is initialized before use in every >>> possible path.) >> I am not sure what the language specification says, but Sun compilers >> do that. (Note: for scalars only, not arrays.) > > I don't believe you. Reread what John actually wrote instead of what you > were probably thinking about. Do you really claim that the Sun compiler > will "fail compilation" (which is not the same thing as give a warning) > if it does not "know" that every scalar variable is set before use in > every possible path. The Java language specification defines exact rules for when a variable is considered "definitely" initialized, and requires a compilation error if a local variable is used before being definitely assigned a value according to these rules (even if the compiler is so smart that it can recognize that a value is actually assigned in such a way that the specified rules don't detect it). (But maybe you didn't notice that this was a point about Java -- specifically that it is unusual, if not unique, in this respect.) -- James