About 25 years ago, my late brother, who was a free-lance systems analyst, made the following prediction: I don’t know what programming language engineers will be using, but I know what it will be called: Fortran. What he meant was that the language had changed enormously over the years (Structured Fortran, Fortran with Watfor, Fortran with Watfive, etc.), they still called it Fortran.
So what’s the Straight Dope. Do engineers still use a language called Fortran, or have given it up for C (or C++) or Python or something else?
Only a specific type of engineer used Fortran. It’s a language for doing complex math, and when I was last in that field (10-15 years ago) they still were using a form of Fortran, although other languages were making inroads. Today I have no idea, but no one else appears to be using it. People never used Fortran for common programming tasks and today there are vast numbers of options.
The idea isn’t original to your brother. It’s been a common saying for at least 30 years.
FORTRAN is still in use, but (IMHO) the vast majority of software being written today is in some variant of C, or one of the script-like languages like Python, Ruby or Javascript.
FORTRAN lives on as a model for keyword based languages like BASIC. But otherwise it’s a relic. It was useful as an efficient language for CPU intensive work through the 80s, there were even FORTRAN machines designed to rapidly executed compiled FORTRAN code, but rapid increases in processing speed and more efficient compilers eliminated that advantage. It was heavily used in commercial nuclear reactors around 1990, haven’t heard much about it since then.
I still occasionally encounter Fortran when doing things like installing R packages. So, end users are doing their work in R, but within R they are using functions that are implemented as libraries written in Fortran. For example (and this is just made up, because I can’t bother to find a real example), there might be an R package to do numeric optimization, and the actual optimizer is written in Fortran.
Fortran seems to be frequently used enough in high performance computing that Intel continues to support and release a Fortran compiler and Fortran versions of their math kernel libraries. Nvidia also appears to have a Fortran compiler for CUDA.
I was in IC design and Electronic Design Automation for 37 years and I knew of no one who used FORTRAN. I doubt any students today in CS or computer engineering even have learned it. That doesn’t mean there aren’t legacy applications, but it is hardly cutting edge.
At our Plant the Engineers still use FORTRAN. As a programmer, I can get involved. It has a weird way of using “common” memory areas to share large number of variables between main program and subroutines which actually makes sense because things like Dynamic Matrix Control can have hundreds if not thousands of variables. But, as a high level language you shouldn’t have to handle finicky mappings between memory sections.
I once got a job (in 94’) because I was a good FORTRAN programmer, but I have not used it in 20 years. I don’t know anyone who still uses it and would say it has been replaced by C and Python.
I learned FORTAN before I learned C. These days, my FORTAN skills are pretty rusty. Over the years, we have converted almost all of our customer’s FORTRAN code to C. There may still be a few tiny bits of it still in use out there somewhere, but I doubt that any of the younger engineers would even know what to do with it.
I put FORTAN right up there with my VMS skills. I could probably do something useful with them in a pinch, but they are otherwise pretty obsolete these days. Not quite as obsolete (or rusty) as my RSX-11 skills though.
My company just recently ran an internal April Fool’s joke where the entire source of humour was treating Fortran as a still-relevant language.
Some decades-old tech has remained relevant (I use vi(m) nearly daily, for example) but Fortran is not one of those things. There is still Fortran code being used, but nearly entirely in maintenance mode.
I want to specifically address this. As others have said, FORTRAN programs are still in use and today frequently found in high-performance computing applications. However, modern FORTRAN 2018 is still quite recognizable as FORTRAN. Your brother seems to be implying FORTRAN would have slowly evolved into an essentially completely different language but retain the name, but that’s not the case.
As an engineering student in the seventies, I learned FORTRAN, and used it extensively for a long time. Later, I found that anything I used to do with FORTRAN could be as easily done with Excel.
Now, as an engineering instructor, we teach our students MATLAB which seems to be pretty popular.
I’d qualify that “high-performance computing” done in fortran us usually high performance linear algebra routines. I don’t know of much done in fortran that isn’t to link to LAPACK/BLAS and the like. “High-performance computing” is a broad term, and most segments of it don’t use fortran.
The other line about fortran is, “A good fortran programmer can write fortran code in any language”.
There is an object-oriented extension for Fortran 90 and more recent releases, although I have never seen anyone use it. Fortran was revered for its extremely fast computational performance compared to any high level compiled language and is still a benchmark for the computational efficiency of compiled code but many other language like C can get close, and even with scripted languages like Python using Cython and precompiled libraries a programmer can get close enough to Fortran-like performance especially considering how fast and cheap memory (which is the general bottleneck in large scale computational problems) is.
Many simulation codes with heritage from the 'Sixties or 'Seventies such as the NASTRAN finite element solver were built on Fortran, and while extensions and wrappers for them are generally written in C/C++, Python, or other ‘modern’ languages, if you want to do something that requires direct interface with the core functionality you have to at least understand the Fortran code, and of course if you look at a NASTRAN input deck (or that of any derived solver) the Fortran heritage is quite obvious with its 80 column limit and syntax conventions. (Commands and definitions in NASTRAN are often referred to as “cards”, which is actually a reference to physical data punchcards from the era of keypunch programming.)
However, you don’t have to know a single Fortran command to use NASTRAN or LAPACK libraries; you just have to know how to call a command, and with many simulation codes modern preprocessors do all of the input deck formatting for you so many analysts have never actually looked at a raw deck. Unless you are trying to interface with or rewrite legacy code, there is essentially no reason to learn Fortran except for historical interest.
I haven’t seen Fortran in years, other than the rare sighting in really old legacy code. Haven’t written a line of Fortran since the mid-80s. Almost all my coding is C++ now.
As an older programmer, I tend to cluster a lot of functionality into very few (sometimes just 1) classes, which the younger programmers find comical. They occasionally joke that “Pullin can write Fortran in any language.”
I read a long time ago that IBM’s goal for PL/I was to have the computational power of FORTRAN and the self-documenting features of COBOL; what they ended up with had the computational power of COBOL and the self-documenting features of FORTRAN.
(Not that I can point fingers, even if I wanted to: I spent the first twenty years or so of my career with RPG on various IBM midranges, and retired from a gig doing COBOL on an iSeries.)
In physics, there’s an age divide: Older physicists prefer to use Fortran, while younger physicists prefer to use C or some variant thereof. In my experience, it seems to be about the same age divide as the preference for chalkboards vs. whiteboards.
There are also some more specialized environments/languages like IDL that are widely-used in some subfields because they have a large library, built up over the course of decades, of routines useful for those subfields. Even without seeing the innards, it’s quite obvious that some of those library routines were written by Fortran programmers, and some by C programmers.
As evidenced most clearly in the classic Numerical Recipes books. The authors were Fortran programmers, and wrote the original in Fortran. Then they translated it to other languages, like Numerical Recipes in C, which is all Fortran code written in C.
But it’s true for most languages: A good C programmer can likewise write C code in any language. And back in my days of being active on IRC, I met a fellow who used the dinky scripting language that came with mIRC (the most popular client) to write C++ code.