I'm a Mechanical Engineering student interested in the field of aerospace engineering where, I'm told, Fortran is still commonly used.
Which version of Fortran should I invest my time to learn?
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It only takes a minute to sign up.
Sign up to join this communityI'm a Mechanical Engineering student interested in the field of aerospace engineering where, I'm told, Fortran is still commonly used.
Which version of Fortran should I invest my time to learn?
It's a bit of a popular misnomer that there is a "version" of Fortran to know. With rare exception, the latest Fortran standards (and compilers) retain excellent backwards compatibility with older standards. This is with good reason: not many people would use Fortran today if it weren't for the large amounts of legacy code still in use. That is to say, a standards-compliant Fortran77 code will almost invariably still work with the latest compilers.
You should learn to use the most modern version of the language available. F2008 might not have added anything terrible useful to a beginner, but F2003's introduction of object-oriented concepts is definitely a big deal. "Modern Fortran Explained" is a decent place to start, and "Scientific Software Design: The Object Oriented Way" is also pretty good for actually learning to put it into practice.
Pragmatically, if you're going to be working on legacy code (say F77 or earlier), at some point you'll have to learn some of the things they did because of a lack of F90+ features. For example, if you're writing Fortran code for something, you should never use what's called a "COMMON block", but you will invariably see them come up in F77 code you might have to use.
I would never recommend someone start working in Fortran without at the very least the F90/95 feature sets.
That said, if you're not well versed in programming in some other language, you would probably find a consensus that Fortran isn't the best language to learn as your first, even if you're going after aerospace. (And I say that as someone in aerospace that uses Fortran regularly and had it as my first language).
I disagree with both of you. C++ and Python are still not as optimized as FORTRAN. I would definitely agree that FORTRAN 90/95 is the minimum. However, it is always useful to use other more modern versions. The challenge with FORTRAN is that if you learn it before you learn object oriented languages, it is easy to understand. It is much harder to learn if you are used to thinking with objects. I teach the supercomputing class here and I force my students to use FORTRAN. It forces them to use a different sort of logic in programming. They don't like it because it doesn't "think" like Python or C++. It all really comes down to what you intend to do and how much parallization and performance matter.