Re: IMPLICIT NONE (F2k8+/-)



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
.



Relevant Pages

  • Re: IMPLICIT NONE (F2k8+/-)
    ... > Please address this complaint to compiler vendors. ... > interests in selling compilers to support legacy code. ... > committee is supposed to tell programmers what they like. ... > do so no matter what the standard says. ...
    (comp.lang.fortran)
  • Re: IMPLICIT NONE (F2k8+/-)
    ... And the victims range from the most novice to the most expert (who despite using IMPLICIT NONE in his own code often has to debug other, lesser, code.) ... It has to do with pragmatism, after 33 years of Fortran experience. ... by shrinking the market by nannying other programmers with whom you simply disagree. ... The compilers will always do so no matter what the standard says. ...
    (comp.lang.fortran)
  • Re: IMPLICIT NONE (F2k8+/-)
    ... Implicit none is the more disciplined approach, ... Fortran because they find MATLAB et al. more useful. ... your "computer science correctness" arguments outweigh their interests in selling compilers to support legacy code. ... Please indicate how the stupid committee is supposed to tell programmers what they like. ...
    (comp.lang.fortran)
  • Re: What can be done in FORTRAN that cannot be done in C/C++?
    ... > suggested making implicit none the defaulu fro free source form. ... > Perhaps the standard could require compilers to have both ... > switch separate from the code). ... The standard has generally ...
    (comp.lang.fortran)
  • Re: future C standards
    ... A number of C99 features are popular extensions (// ... difference is that most programmers remain sufficiently satisfied ... macros and possibly other standard typedefs. ... compilers are the things one sees adopted first. ...
    (comp.std.c)