Re: IMPLICIT NONE (F2k8+/-)
- From: Walter Spector <w6ws_xthisoutx@xxxxxxxxxxxxx>
- Date: Tue, 25 Oct 2005 17:02:05 GMT
Dan Nagle wrote:
> ...
> Which train left which station?
>
> The implicit none debate? or MATLAB et al.?
MATLAB et al.
> >>Is the purpose of standardization to encourage portability
> >>or to nanny programmers?
>
> > Yes.
>
> That is a response to an either-or question?
Yes. (Assuming 'inclusive' OR. :)
> How pragmatic is it to raise the cost of Fortran compilers
> by shrinking the market by nannying other programmers
> with whom you simply disagree. The fact that I agree with you
> in this debate doesn't give me any greater sway with those who disagree.
The Fortran compiler market may be shrinking for a number of reasons.
One may be that applications written in it are often (correctly) perceived
as inherently error-prone. Another may be the availability of free compilers
such as f95/gfortran. Another is definately that many people have fled from
Fortran over the past 20 years because the language has not evolved fast enough
to cover their needs. There are many others.
> ... I always put an unqualified private and
> an unqualified save in every module. Should the standard
> dictate those practices as well?
IMO? "Perhaps someday" for PRIVATE. I don't have a huge preference one
way or the other, and it is easy to switch PUBLIC/PRIVATE as needed.
And "no" for SAVE. But neither of the above has the 'elephant in the room
that no one wants to talk about' status that the default data typing
situation has.
A more important step might be to someday require that all interfaces be
explicit. But one step at a time.
> How? Suppose the standard dictates that implicit none is now mandatory.
> Compiler vendors set their default switch to be "no implicit none"
> in response to many complaints.
That is their right.
But please take note of current C-99 compilers as a counter example, and a
way for compiler vendors to do better: C-99 fixes the 'implicit int' problems
that have dogged 25+ years of C programs. Current C-99 compilers that I use issue
a *warning* when 'int' is omitted, not a fatal error. This allows existing
programs to continue to compile, yet helpfully informs the developer that something
is missing. Depending on point of view, the "something missing" may either be to
insert the missing declarations, or to insert a "shut the compiler up" option into
the makefile.
> Contrary complaints receive the response "only standard-conforming when
> using these switches, please RTFM" and your reply is...
This is no different than the situation today. One must use a -ansi
switch of some sort to show the developer where the non-Standardisms are.
Nothing has changed.
> Again, how does the standard dictate programming style?
By depricating features which are known to cause problems.
> J3 has been directed to delete statement functions.
> The vendors are rebelling. What's your course of action?
Allow them as an extension.
> How does standardizing implicit none compel anyone to do anything?
The upcoming book "An Introduction to Fortran-2xxx" (whatever it is
called) will gently lead the next generation of Fortran programmers to
type the words INTEGER and REAL to declare their variables. It may have
a footnote explaining that older codes often assume that names starting
with I-N are assumed to mean INTEGER and that other names are assumed to
be REAL. But that this was found to silently allow lots of bugs in programs,
and is considered to be a Bad Idea.
The book will then offer advise to the reader that should he encounter
such a code, he can insert an IMPLICIT REAL (A-H, O-Z) INTEGER(I-N) line in
the affected routines. (Which even in large applications should only take
a few moments with any modern text editor.) Or fix the code (which might take
a bit longer.) Or check his vendors documentation for a 'compatibility' option.
Walt
.
- Follow-Ups:
- Re: IMPLICIT NONE (F2k8+/-)
- From: Dan Nagle
- Re: IMPLICIT NONE (F2k8+/-)
- From: Greg Lindahl
- Re: IMPLICIT NONE (F2k8+/-)
- References:
- IMPLICIT NONE (F2k8+/-)
- From: Gary L. Scott
- Re: IMPLICIT NONE (F2k8+/-)
- From: David Flower
- Re: IMPLICIT NONE (F2k8+/-)
- From: Gary L. Scott
- Re: IMPLICIT NONE (F2k8+/-)
- From: Dan Nagle
- Re: IMPLICIT NONE (F2k8+/-)
- From: Walter Spector
- Re: IMPLICIT NONE (F2k8+/-)
- From: Dan Nagle
- Re: IMPLICIT NONE (F2k8+/-)
- From: Walter Spector
- Re: IMPLICIT NONE (F2k8+/-)
- From: Dan Nagle
- IMPLICIT NONE (F2k8+/-)
- Prev by Date: Re: equivalencing a charactor string array to a double array
- Next by Date: Re: IMPLICIT NONE (F2k8+/-)
- Previous by thread: Re: IMPLICIT NONE (F2k8+/-)
- Next by thread: Re: IMPLICIT NONE (F2k8+/-)
- Index(es):
Relevant Pages
|
|