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,e859f774bbb3dfb3 X-Google-Thread: 1094ba,40d8c5edfa36ea47 X-Google-Attributes: gid103376,gid1094ba,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z66g2000hsc.googlegroups.com!not-for-mail From: fj Newsgroups: comp.lang.ada,comp.lang.fortran Subject: Re: another way to shoot yourself in the foot? Date: Thu, 10 Jul 2008 07:57:59 -0700 (PDT) Organization: http://groups.google.com Message-ID: <22c10ab3-23ff-4ac4-8f33-88721d41cdf9@z66g2000hsc.googlegroups.com> References: <54157920-377a-441b-9b0b-f0c4f9ddffec@f36g2000hsa.googlegroups.com> <54435596-5e7f-4686-a2b7-1e22d7c4b186@p25g2000hsf.googlegroups.com> <_wPbk.7600$L_.4566@flpi150.ffdc.sbc.com> <1ijtbxq.1t7i71w700eykN%nospam@see.signature> NNTP-Posting-Host: 193.52.72.210 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1215701879 13198 127.0.0.1 (10 Jul 2008 14:57:59 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 10 Jul 2008 14:57:59 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z66g2000hsc.googlegroups.com; posting-host=193.52.72.210; posting-account=W46JWQoAAACDHzKnvQSXSFySE1Re8EpE User-Agent: G2/1.0 X-HTTP-Via: 1.1 AISAS102 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080404 Iceweasel/2.0.0.14 (Debian-2.0.0.14-0etch1),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:1081 comp.lang.fortran:2571 Date: 2008-07-10T07:57:59-07:00 List-Id: On 10 juil, 16:10, Colin Paul Gloster wrote: > On Wed, 9 Jul 2008, Richard Maine wrote: > > |------------------------------------------------------------------------| > |"Colin Paul Gloster wrote: | > |[a very long post including quite a lot of quotations of me, among | > |others] | > | | > |I'm afraid that this post was too long and rambling for me to follow it.| > |I could not detect any coherent message in it, other than perhaps a hint| > |of randomly assembling quotes that sounded negative about Fortran (often| > |out of context, at least for some of mine)." | > |------------------------------------------------------------------------| > > Dear Richard and everyone else, > > I did not intentionally take quotes about Fortran out of > context. If you can spare the time, then please help me to learn > Fortran by explaining my misconceptions. > > |------------------------------------------------------------------------| > |" In addition to preferring | > |coherent organization and readability in my coding, I prefer the same in| > |newsgroup postings. | > | | > |If you have some actual message that you are hoping I might respond to, | > |you'll have to state it a bit more coherently and concisely." | > |------------------------------------------------------------------------| > > Please find below a summary of most of that post posed as yes-or-no > questions. I have tried to rephrase > /-----------------------------------------------------------------------/ > /"Gary Scott edited out all citations to newsgroup posts from circa 2007/ > /which do not promote Fortran. Perhaps posters to / > /news:comp.lang.fortran would care to inform me as to whether or not / > /they are valid..." / > /-----------------------------------------------------------------------/ > "a bit more coherently and concisely." > > |------------------------------------------------------------------------| > |" Decoding | > |that tome doesn't seem worth the work. If the message is just a general | > |language flame, which is perhaps the main flavor I hear, then you need | > |not bother, as I won't respond, coherent or not." | > |------------------------------------------------------------------------| > > I had looked at some Fortran newsgroup articles and webpages and code > in 2007, but I have only started in a Fortran project this year. I > have started to read a Fortran book for the first time this week. The > Fortran project which I have joined so far involves replacing Fortran > with C++. This had begun before I have joined. I do not approve of > replacing Fortran with C++. However, if Ada is better than Fortran, > then I approve of replacing Fortran and C++ with Ada. So, please > rectify any misconceptions which I may have. (Later, if Fortran > compilers produce much faster executables, then I may be motivated to > use some Fortran even if I shall still believe then that Ada is a > better language overall.) > > I did point out in the long post that Ada is not perfect with respect > to all of these flaws. > > If answers differ with respect to different versions of Fortran > (e.g. 77; 90; 95; 2003; 2008; and any others worth considering), then > please elaborate accordingly... > > Does Fortran have undefined behavior? Only with invalid (non conforming) programming > > Does Fortran always automatically check if the INTERFACE actually > corresponds to the code? > > Does Fortran statically forbid out-of-bounds array accesses at > compilation time? No but nice Fortran compilers provide this feature. > > Does Fortran allow argument mismatch? No if you use modules ( >= F90 ), put all sub-routines in modules and adopt USE. > > Are Fortran 90 modules compatible at the binary level on the same > architecture? No > > Does Fortran have an exception mechanism? Yes ... if alternate return capability is condidered (>= Fortran 2 ???) Yes if you want to test IEEE exceptions (>= F2003) but the mechanism is different than the one in JAVA for instance. > > Are "there are a number of things the Fortran standard leaves > unspecified that it should pin down"? ? > > Does Fortran allow one to declare a type such as > type > The_Resolution_For_Nanoteslas_Supported_By_My_Analog_To_Digital_Converter > is delta 1.0 / 2.0**5 range - 256.0 .. + 256.0 - 1 .0 / 2.0**5; > (that is in Ada syntax, but I am not worried about the syntax: the > feature is important, not how it is expressed)? Not exactly but you can ask for the minimum precision you want with selected_int_kind or selected_real_kind > > Does Fortran guarantee what happens during overflow for signed and > unsigned integers? No > > Could Fortran 90 allocatables be left in an undefined state? No. Either an allocatable is allocated or not. > > Does Lahey's implementation of TR 15581 contain a bug which leaks > memory? Never seen > > Do the Fortran standards require detection of only trivial errors? Yes/No depending of what you call a trivial error > > Is an optional garbage collector buggy? No need of garbage collector in F2003 if you allocate only allocatable arrays. Deallocation is automatic when the array (or the derived type variable containing that array) becomes out of scope. > > In principle FORALL should be good, but Fortran implementations > thereof seem to be bad. Is this due to a flaw in the definition of > Fortran itself? No. Only the implementation is responsible ! Personally, I don't use the FORALL statement. > > Does Fortran allow one to use an undefined variable? yes but nice compilers try to detect that at compile time and often propose to initialize undefined variable to NaN (for instance) to improve the detection at run time. > > Does Fortran allow a default value at the declaration of a variable? Not a default value. Just an initial value ! But if you think about optional arguments, then a missing optional argument cannot have an explicit default value in F95. Of course, it is easy to solve the problem in the routine itself in using the PRESENT intrinsic function. > > Yours sincerely, > Colin Paul Gloster