comp.lang.ada
 help / color / mirror / Atom feed
From: nospam@see.signature (Richard Maine)
Subject: Re: another way to shoot yourself in the foot?
Date: Thu, 10 Jul 2008 09:47:56 -0700
Date: 2008-07-10T09:47:56-07:00	[thread overview]
Message-ID: <1ijuuha.19dsfk41kdhvr4N%nospam@see.signature> (raw)
In-Reply-To: 22c10ab3-23ff-4ac4-8f33-88721d41cdf9@z66g2000hsc.googlegroups.com

fj <francois.jacq@irsn.fr> wrote:

> On 10 juil, 16:10, Colin Paul Gloster <Colin_Paul_Glos...@ACM.org>
> wrote:

> > Could Fortran 90 allocatables be left in an undefined state?
> 
> No. Either an allocatable is allocated or not.

That is true now, but wasn't so in f90, which the question specifically
asked about. But then, this is one of the many things in the set of
questions (at least now I can read them) that strike me as being either
out of context or otherwise irrelevant to current programming. This was
true only of f90. Prior to f90, there were no allocatables. In f95, this
"feature" was fixed. You won't find any f90 compilers currently being
supported today. If you manage to find some old compiler that still has
this issue, and you are using that compiler, then I think that pretty
conclusive evidence that you don't care about "minor" issues like
reliability and support. All quality compilers with active support were
long ago upgraded.

My question in return is why anyone would be asking this other than as
flame material? It was quite explicit in the citation (which was mine,
by the way) that this was an f90 feature fixed in f95.

I'll not elaborate on details of several of the other questions. The
answers Francois gave are at least good enough, if they aren't quite the
way I would have answered. Several of them seem to fall in the
categories of either:

1. Does some random compiler have some random bug or misfeature
(including the lack of an important feature)? These have a lot the
flavor of scouring the newsgroup for negative things. I'll give the
general answer that, yes some compilers have some bugs and misfeatures.
I'll add that some compilers are worse about this than others. I'll also
add that this answer is completely non-Fortran specific. It applies
equally well, for example, to C, C++, Ada or any other language that is
more than trivial. I will ignore requests for examples or claims that it
isn't true of some language. That avenue of usenet discussion has no
constructive end - just flames. While it is no doubt the case that some
languages have a higher frequency of compiler bugs than others and that
there might be some lessons to be learned from that, frankly the odds of
such constructive data comming out of a usenet discussion like this are
zero. To be anything cloise to useful, such a thing would actually
require comprehensive study rather than just random samples of things
that people happened to post.

or

2. Does Fortran do the impossible? Things that apply to essentially all
languages, but with the question phrased as though it were a
Fortran-specific matter. This also has the look of just skimming the
newsgroup for things that sound negative. For one example, no Fortran
doesn't check all array bounds "at compile time". That is inherently
impossible in any language unless it is so limitted as to be useless.
Array index values can be a function of input data, which is not
available at compile time. If a language didn't allow such input data,
it would be in the category of so limitted as to be useless. Checking
some bounds at compile time is practical and is often done. Checking all
bounds at run-time is practical in many cases and is often done.
Checking all bounds at compile time is essentially nonsensical. Phrasing
this as a Fortran matter smacks of flaming and pulling things out of
context. (The context lost is that this is not Fortran-specific).

or

3. If you ignore advice about good programming practices, can you get in
trouble? The answer, of course, is yes. That's why they are good
programming practices. Several of the questions appear to be pulled from
explanations of why some programming practices are good, but the context
of the good practices was omitted, leaving just the negative part of
what can happen if you ignore all the good advice.

Quite a lot of the questions fall into those 3 categories. In fact,
skimming them, I'd say that most do. If these are the kinds of questions
being raised in your attempts to evaluate languages, then the effort is
doomed from the start. You won't get useful results starting from
questions like these. It is so much the wrong direction that I can't
even offer constructive criticism other than to throw everything out and
start from scratch with an open mind. I just can't imagine getting there
from this starting point.

This will be my last post in this thread. I see no constructive benefit
to posting further. I was pulled into posting this one by the factual
error in the answer about undefined allocatable state. (The answer is
correct for today, but was not correct specifically for f90). I've gone
on for far more than I really ought to have already. It would take quite
a bit longer to give detailed answers and elaborations to each question,
but I don't see the benefit of doing so.

-- 
Richard Maine                    | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle           |  -- Mark Twain



  reply	other threads:[~2008-07-10 16:47 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-20  9:03 another way to shoot yourself in the foot? fedya_fedyakoff
2008-06-20  9:34 ` Dmitry A. Kazakov
2008-06-20  9:48   ` fedya_fedyakoff
2008-06-20 10:01     ` Ludovic Brenta
2008-06-20 10:05 ` christoph.grein
2008-06-20 10:26   ` Dmitry A. Kazakov
2008-06-20 16:12     ` Adam Beneschan
2008-06-20 15:48   ` Adam Beneschan
2008-06-20 19:27   ` Robert A Duff
2008-06-20 23:37     ` Jeffrey R. Carter
2008-06-21  8:56       ` Dmitry A. Kazakov
2008-06-22 20:44         ` Robert A Duff
2008-06-23  7:49           ` Dmitry A. Kazakov
2008-06-24  4:02             ` george.priv
2008-06-24  7:30               ` Dmitry A. Kazakov
2008-06-24 17:16                 ` Robert A Duff
2008-06-24 19:15                   ` Jeffrey R. Carter
2008-06-24 20:31                     ` Robert A Duff
2008-06-24 20:50                       ` Ludovic Brenta
2008-06-24 23:02                         ` Robert A Duff
2008-06-24 23:42                         ` Georg Bauhaus
2008-06-24 21:24                       ` Jeffrey R. Carter
2008-06-24 23:24                         ` Robert A Duff
2008-06-25 15:07                       ` Adam Beneschan
2008-06-24 14:59             ` Adam Beneschan
2008-06-24 16:41               ` Dmitry A. Kazakov
2008-06-24 17:20                 ` Robert A Duff
2008-06-24 17:52                   ` Dmitry A. Kazakov
2008-06-24 23:35                     ` Georg Bauhaus
2008-06-25  8:09                       ` Dmitry A. Kazakov
2008-06-25 10:32                         ` Georg Bauhaus
2008-06-25 12:06                           ` Dmitry A. Kazakov
2008-06-22 20:37       ` Robert A Duff
2008-06-22 21:25         ` Jeffrey R. Carter
2008-07-04 20:52           ` Colin Paul Gloster
2008-07-04 22:15             ` (see below)
2008-07-05 16:06               ` Colin Paul Gloster
2008-07-05 13:38             ` Gary Scott
2008-07-05 16:42               ` Colin Paul Gloster
2008-07-05 19:00                 ` Gary Scott
2008-07-09 19:39                   ` Colin Paul Gloster
2008-07-09 20:35                     ` Richard Maine
2008-07-09 22:49                       ` Terence
2008-07-10  1:07                         ` Gary Scott
2008-07-10 14:10                       ` Colin Paul Gloster
2008-07-10 14:57                         ` fj
2008-07-10 16:47                           ` Richard Maine [this message]
2008-07-10 17:03                         ` Dick Hendrickson
2008-07-10 17:26                           ` Craig Powers
2008-07-10 19:55                             ` James Giles
2008-07-10 20:45                               ` Dick Hendrickson
2008-07-10 21:22                                 ` Richard Maine
2008-07-10 21:29                                   ` Craig Powers
2008-07-10 20:45                               ` Craig Powers
2008-07-10 19:51                           ` James Giles
2008-07-11 15:02                             ` Colin Paul Gloster
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox