I believe we should think of Fortran as a domain-specific language for handling multidimensional arrays, rather than a normal programming language. It might be terrible for other things, but it's great for array computations, and that's what people use it for in big simulations. Since it has a well-defined C FFI nowadays, it's easy to connect it to other languages that can do other things (parsing data files, etc.).<p>Coming from a more traditional CS background, I always thought that Fortran was archaic until I actually had to learn it for some scientific computing. I found it awkward to use, but at the same time, it had array capabilities that I've never seen in any other language.
I was surprised to see when I installed R for the first time, that a large amount of the libraries it makes use of are written in fortran.<p>To complete the installation required me to choose from one of several current and compatible fortran compilers even.<p>So at least for fortran, the answer is scientific computing.
I really like the top two answers.<p>A few points, when I was in school and that was only 5 years ago, I learned Fortran. I learned it because I was starting as a Mechanical Engineer, and one of the heat transfer classes involved solving differential equations via programs. If you wanted to get help from the egg head professors you had to take Fortran because that's what they knew. The Fortran class was Mechanical Engineers and Nuclear Engineers. I believe we were working in Fortran 77 & 90.<p>One of my friends from college is working on his PhD in physics. He spends his summers and breaks in Los Almos labs, and uses particle accelerators. Anyway - he told me that they use Fortran for their calculations purely because it was easier to translate to the language and it's all math.<p>Anyway that's just my $.02
Scaring baby programmers.<p>Oh, and lots of scientific computing is done in Fortran - eg. the sorts of work my brother does on atomic structure as a computational chemist at ITU, running on grid or supercomputers.<p>On the flip side, there's lots of very large, poorly documented programs which are effectively "mission critical" Fortran. Until someone ponies up a LOT of money to re-write and revalidate them, Fortran ain't going away.
The best-paid freelance programmer I ever knew was a man older than my dad who was the only guy left in the country that could code Cobol for certain kind of industrial equipment.<p>For the companies that hired him it was cheaper than changing that equipment, and by <i>cheaper</i> I mean the guy was able to buy an Hacienda with what he made coding Cobol, nuff said.
I cut my teeth as a professional developer in 1996 writing fortran77. We used it to test wire bundles on airplanes. Important stuff actually (unlike the Web apps most of us make today!)
This SO answer has interesting comments on Fortan performance: <a href="http://stackoverflow.com/a/13079021" rel="nofollow">http://stackoverflow.com/a/13079021</a><p>And this appropriately grumpy rebuttal from a JPL guy to the 2004 "Petition to Retire Fortran" makes some good arguments for not retiring it (and also gives some Ada love): <a href="http://www.fortranstatement.com/Site/responses.html" rel="nofollow">http://www.fortranstatement.com/Site/responses.html</a>
I use Fortran every day for fluid dynamics research. Fortran is the abusive partner you keep going back to. If C had array operations and aliasing restrictions I would switch in a heartbeat. As it is the syntax "a=b" is a lot better than four nested for loops and hence 4 opportunities to fuck up the indices.
COBOL & RPG = your paycheck or the managing the bank account your money is in.<p>There is a huge amount of COBOL / RPG processing flat files to do various financial transactions. It works and has worked for decades, so not many folks really have the willpower and cash to rewrite it.
I have a friend who is a physics major, one of the primary reasons he was learning to program was to use MPI & OpenMP languages, and presuming fortan has a very high performance / robust compiler for using MPI, this would probably be the soul reason it's used for large super computer & cluster computations because it's designed for distributed computation. I think this guy has the best answer: <a href="http://stackoverflow.com/questions/2266643/for-what-are-fortran-cobol-and-co-used-today/2480052#2480052" rel="nofollow">http://stackoverflow.com/questions/2266643/for-what-are-fort...</a>
As an ex-COBOL programmer, I did some research in this area and I uncovered the following (from a 2009 blog post of mine).<p>--<p>Do a little research into COBOL and a few interesting things jump out at you. Some of this information is from Gartner Group and the rest can easily be verified by doing even a brief survey of the field. Taking the following bits of information:<p>* 75% of the world's business data passes through COBOL (Gartner Group estimate)<p>* There is possibly up to a fifth of a trillion lines of COBOL code out there (Gartner again)<p>* People are still writing COBOL constantly, but usually on existing systems.<p>* The industry is struggling to find new COBOL programmers because few young programmers love the thought of maintaining decades-old enterprise systems where all data is global and GOTO is often the first choice in flow control.<p>* Many companies want to move from COBOL, but can't do so easily because too much code is written in COBOL (and the source is often lost).<p>People really, really underestimate these problems. For example, I've seen several companies express a desire to move away from Perl but find out they can't because they don't realize quite how reliant on the language they are.<p>Now imagine a multi-national corporation with several million lines of COBOL code. What are they going to do?<p>COBOL salaries, from what I've seen, are trending upwards. Older programmers are sometimes being enticed out of retirement to maintain legacy systems (this is rather hit or miss as there appears to still be some age discrimination here). There are companies out there offering software to allow COBOL programmers to write NetBeans, integrate with .NET code or simply translate the COBOL into other languages (the latter appears to have mostly been a disaster, but I don't have enough hard data on this).<p>So let's summarize the above:<p>* Trillions of dollars flow through COBOL.
* Trillions of dollars flow through systems that businesses want to replace.
* Current mitigation strategies involve supplementing COBOL, not replacing it.<p>You come up with a strategy to allow COBOL systems to naturally migrate to a new language and you stand to make <i>millions</i> of dollars. By the way, I said "naturally". There are things like COBOL to Java translators (e.g., <a href="http://opencobol2java.sourceforge.net/" rel="nofollow">http://opencobol2java.sourceforge.net/</a>), but COBOL is procedural and all variables are global. It doesn't even come close to mapping to an object-oriented paradigm (and any experienced OO programmer will understand why).<p>I actually have what I think is a decent migration strategy for COBOL, but that's a story for another day.
In the 2000s in college I was working with a gas turbine simulator written in FORTRAN whose file format reflected its origins as something using punchcards.
I used to script FORTRAN back when I was in nuclear engineering. I didn't know of Fortran's particular advantages other then that the software we used was built in FORTRAN and all our scripts to date that we used were built in FORTRAN and the general attitude in the uber-safe world of nuclear engineering is if it works, and works well, why in god's name would you mess with it :)
I work in a bank and we're currently looking for a new all-encompassing loan and leasing system. The primary candidate, from Sopra, is written in COBOL and runs on an IBM mainframe.<p>... yup, people buy new COBOL software even today.<p>PS: I won't have to touch the thing, thank god. I made it pretty clear to my boss I would rather find a new job than to dedicate myself to supporting this monstrosity :)
I'm kinda blown away that this question hasn't been closed on stack overflow already. The mods are usually so aggressive about discussion-type questions.
A friend of mine used to work at PG&E in San Francisco. He told me that there is an ancient server in the basement running COBOL code that no one quite understood, upon which was a hand lettered note to never touch that machine for any reason, ever.