SteamKing said:
Fortran works well at what it was designed to do: Crunch Numbers, and lots of them.
yes, it does---to some degree. But even in this area skilled programmers can much benefit from the more powerful languages. There is nothing you can do in Fortran which you cannot do in C++ too, if you know what you are doing. And there are many things in C++ which you would not even try in Fortran (I am not even talking about the expressivity of Python or Common LISP or similar).
SteamKing said:
Fortran was never designed for systems work; no one would want to use Fortran to write an operating system or set up security for one.
That is certainly inadvisable. But security does not end there. For example, even in a number crunching engineering application one might very well be interested in processing user input, and in doing this, not having a program which is not filled to the brim with exploitable stack and heap overflow errors. Almost all Fortran applications I have seen are simply horrible in this regard.
And, just for the record: I have actually seen interpreters for domain specific scripting languages written in Fortran 77/90. Which are widely used by 100s of research groups word wide...
SteamKing said:
Not bad for a language which is "ridiculously impotent".
Do not get me wrong: There is some
extremely clever software written in Fortran. And I have the utmost respect for it. This includes, for example, the LAPACK, but also various other "legacy" scientific applications. I myself work on a program with about 2 million lines of Fortran and 250k lines C++ code, which is widely used in chemistry, and a lot of the Fortran code is very well engineered and very well thought out.
But just that such applications
can be written in Fortran does not mean that it is necessarily a good idea for new programs. While a lot of this code is very clever, there are also countless instances of 2000-line-functions with 100s of if-then-else branches, copy-paste-slightly-modify code, functions taking 50+ function arguments etc., because a proper interface for these things can simply not be expressed in Fortran (for example, I have counted more than 10 slightly different versions of the same subspace convergence acceleration algorithm; in C++ I have only one of them). This creates serious maintenance problems.
SteamKing said:
In any event, computer languages are a lot like people languages: the more of them you know, the better off you'll be.
This is not quite true in Fortran, because there is only so much you can do with the language. Many options you get with other languages are simply not there. Or they are formally there, but you can't use them because they are buggy across different compilers or outrightly unsupported (the last time I tried, in 2007, it was in practice impossible to put records in dynamic arrays or dynamic arrays in records, or do a number of other
very basic things, because any of them would not work in at least one of the six different compilers the applications I had to work on was supposed to support. In 2007, compilers did not even fully the support Fortran 95 standard!).
D H said:
You sure about that? Fortran 95 added pointers to the language. There is a huge potential problem with pointers, which is aliasing.
This is not quite as bad in Fortran, because the pointers are not as flexible as in C/C++. You can't make pointers to arbitrary objects (only to objects which are declared as "target"), and you cannot freely pass them around.
In practice, of course, you can get the aliasing problem entirely without formal "pointers". In many applications I have seen, the absence of dynamic memory management primitives made the scientists quite inventive: For example, commonly you see a big "work space" array allocated at the start of the program, which is then managed in a stack-like fashion. Memory is then allocated by taking off slices of this array, and passing around pointers into this array. This has a number of practical advantages in many applications, but you DO get all the "benefits" of pointer-arithmetic and aliasing related problems without having any pointer primitives at all.
It's 2015, and there are modern Fortran compilers that are not yet Fortran 2003 compliant. From what I can tell, there is no such thing as a fully-compliant Fortran 2008 compiler.
I agree. Basically, developers have more or less given up on Fortran, and there are very few compiler developers left. What we get in the end is a quite unreliable mass of "stuff", with all compilers supporting different subsets of the standards. So in practice one is more or less forced into the least common denominator: Fortran 90 and only the three basic types (doubles, integers, characters, and arrays of such). And maybe a flat structure from time to time---if you feel brave.