On 5/8/22 8:11 AM, FortranFan wrote:
> On Saturday, May 7, 2022 at 12:21:39 PM UTC-4, Ron Shepard wrote:
>
>> .. a reminder IMPLICIT NONE was not part of standard fortran until f90.
>> So if one wanted to write standard code in the 1980s, this was not an
>> option ..
>
> And that remains yet another unfortunate event in the history of Fortran.
>
> ANSI X3.9-1978 document toward FORTRAN 77 was approved by ANSI on April 3, 1978 that became the de facto standard reference for FORTRAN 77.
>
> Now consider MILITARY STANDARD 1753 FORTRAN, US DoD Supplement To American National Standard X3.9-1978 dated November 9, 1978, months later:
>
https://wg5-fortran.org/ARCHIVE/mil_std_1753.html
>
> which introduced `IMPLICIT NONE` that was recognized as useful by many users at the time and which was then implemented by many compilers as an extension that became popular enough to make it into Fortran 90 revision, 13 years later.
Yes, there were several useful extensions that were in the MIL-STD
document, including IMPLICIT NONE, INCLUDE, and the set of bit operators
that were all eventually included in f90.
I think most programmers were expecting a revision to the f77 standard
in the early 1980s that would have included the MIL-STD features plus
maybe a few more things that did not quite make it into f77.
Asynchronous I/O and conditional compilation (a preprocessor) were at
the top of my most-wanted list at that time. Then in the mid 1980s there
would have been a more substantial update of the language, perhaps
free-form source (to facilitate preprocessor use) would have made it at
that time -- I think those things, along with array syntax, were
included in the early fortran 8x drafts.
But all that never happened.
I continued to use vendor extensions for asynchronous i/o, and I wrote
my own conditional compilation utility (in fortran, of course).
In hindsight, the major benefit of f90 was modules and explicit
interfaces. I do not know when that functionality was adopted in the f8x
saga.
>
> If only `IMPLICIT NONE` had made into ANSI X3.9-1978 document itself, clearly the notion of `IMPLICIT NONE` must have been circulating given its appearance just months later in the MIL-STD 1753 document!
Yes, by the mid 1970s, well before f77 was adopted, IMPLICIT NONE was a
common f66 extension, and it was frequently used by programmers. I do
not understand why it did not make it into the f77 document.
>
> And if only Fortran 90 had instead made `IMPLICIT NONE` the default (the semantics of explicit everything), at least for all the new program scopes it introduced such as INTERFACEs and MODULEs! That is, as compromise at least given all the crazy battles that supposedly characterized Fortran standard revision during the 1980s :-(
One proposal was to make the default different for fixed- and free-form
source. The arguments that won the day were the idea of keeping the
semantics the same between fixed- and free-form source and to maintain
backward compatibility. For me personally, I don't mind typing that line
in my codes, but I know that some programmers do dislike it. On the
other hand, there are some programmers who prefer implicit typing, so
even if IMPLICIT NONE had become the default, they would have continued
to use IMPLICIT REAL(A-H,O-Z),INTEGER(I-N) statements and to continue
that practice.
> That was some serious failure of imagination back then which handicapped the practice of Fortran.
I think the main problem in the 1980s was that the vendors simply did
not want a new standard, for a variety of reasons. Both of the leading
vendors at the time, IBM and DEC, lobbied heavily against revising the
language, along with some smaller vendors such as CONVEX. At least
within ANSI, the vendors had more sway than the users of the language.
It was the ISO committee that stepped up and basically saved the
language from extinction. ISO approved the new language revision BEFORE
the ANSI committee did, something that was unprecedented. That kept
fortran alive, barely, for another decade. Then, I think it was the
development of gfortran that saved it a decade later. Almost certainly,
without ISO f90 and without a free open-source compiler like gfortran,
fortran would not have survived to the present day.
$.02 -Ron Shepard