7 ms·
It's definitely not a dead language – a new Fortran front-end has recently been accepted into the LLVM project, joining Clang. So LLVM's only in-tree supported
by favorited 7y ago
It's definitely not a dead language – a new Fortran front-end has recently been accepted into the LLVM project, joining Clang. So LLVM's only in-tree supported languages (excluding the various IRs) will be C, C++, Objective-C, and Fortran.
It had been scheduled for merge into the LLVM monorepo 2 days ago, but has been delayed pending some additional architecture review.
- throwaway2048 7y agoLots of number crunching code relies on Fortran libraries even today. Install numpy, it will pull in Fortran stuff.
- mywittyname 7y agoI don't work on it directly, but the code base where I work has lots of Fortran. I'm pretty sure they've been trying to migrate away from it since the early 90s, yet it's still there. Fortran has an amazing amount of staying power.
- jofer 7y agoNumpy actually explicitly doesn't need fortran. It will use some fortran lapack libraries for optimizations if they're present, but it doesn't depend on fortran at all. Scipy is a different story. The need for a fortran compiler was a big part of the original rationale for the divide of numpy and scipy when they replaced numeric. Numpy was meant to be the lighweight/core version of things, and scipy was the full-fledged environment. (I think numpy was even scipy-min, or scipy-core, or something along those lines for a bit.) A key differentiator for what when into numpy vs scipy was whether or not it needed a fortran compiler. That's still true today -- numpy explicitly doesn't depend on anything fortran related, and anything that uses it is optional. (I'm not authortative on any of this, I'm just someone who's been doing scientific computing in python (and fortran) since the numeric days.) On a different note, modern fortran (e.g. F90 and above) is actually a really nice scientific software language. It's _still_ really hard to beat, and modern fortran is pretty maintainable and easy to read in addition to being performant. I've dealt with highly optimized fortran codebases and highly optimized C codebases for the same scientific tasks. The fortran ones were usually a lot easier to read, more maintainable, and were still faster. Fortran is not really a general purpose language, but if you're doing lots of number crunching on large arrays, it's damned nice.
- james_s_tayler 7y agoI guess "Formula Translator" lives up to its name then!
- 7thaccount 7y agoI'd like to write some Fortran, but there are a few libraries I need like database access and I'd be set.
- tomrod 7y agoI wonder if we can use a Python wrapper for that?
- 7thaccount 7y agoAt that point I'd just use Python.
- tobmlt 7y agoYep! Seconding what you said: A key aspect is that it’s very easy to write fast matrix math in Fortran. Vectorized operations are downright pythonic! I was amazed how much more complex things were when moving to C++ (as opposed to C or C written in cpp files which you’ll find in academia and some books). Of course, that ease is a hazard when all the modern (i.e. fun) sci-eng software development is in C++. Do not grow complacent in school, ye numerical methods researchers! Write your stuff in C++. The job market awaits.
- biswaroop 7y ago> Do not grow complacent in school, ye numerical methods researchers! Write your stuff in C++. The job market awaits. Could you elaborate a bit on this? I think I know what you mean, but I'd like to hear more if you don't mind.
- tobmlt 7y agoSure - I am speaking broadly of the job market for computational programmers outside of academia and national labs, and I'd better say that I am in the USA. So if you did a masters or PhD in CFD, or the finite element for structures, (and I wager also, E&M/Maxwell, computational physics, and numerical simulation generally (a catch all because the boundaries are fuzzy), but I think "as it goes in CFD and FEA for structures, so it goes in other numerical domains...?"), then it's quite possible you came from a school where your professor(s) wrote in old style C++ (or maybe straight up procedural C), or maybe used only the most basic features of Fortran 90 or worse (F77). The main thing is that while you did something noteworthy in your field to get your degree in engineering simulation or computational physics, you used a language, or language variant, that is not common anymore in _actively_ developed projects commercially. So, outside of academia and national labs, which are hard to get into if you are coming in from say, a state school with fewer connections (and did not intern somewhere as you had research obligations at school, say), in commercial code bases, as far as I have seen, hiring "from without" looks generally for lots of C++ computational/numerical experience. Not such a big deal if you are a pure-researcher in, say, CFD, and not such a big deal in a national lab, where the big codebase may be FORTRAN anyway (caps to denote old school code bases). But it really limits your mobility not to be "C++ first". Lastly, if you land a job at a big numerical analysis company, you may be looking after legacy products forever if you are "just a Fortran person". Well, this is obviously anecdotal. Sorry to state such bald opinions. But it's what I've seen, and really would have been helpful to know as I was going through school. I wrote a lot of Fortran and Python. It's left me playing catch up and it could have been avoided with comparative ease compared to my time budget now.
- teruakohatu 7y agoI sometimes think R is just a fronted for Fortran. For the packages I install I always seem to be waiting for Fortran code to compile.
- solinent 7y agoThere are some optimizations Fortran compilers can make which C compilers cannot, though we can use the "restrict" keyword to allow C to make the same assumptions Fortran makes for aliasing pointers (ie. there are none). However, in order to support all existing C programs I believe they still can't make the same level of optimization as Fortran does. It'd be nice to see this gap merged, in fact. C++ can actually do better with some numeric code since commonly used libraries perform expression optimization at compile-time using Eigen for example.
- lolinder 7y agoLatin was dead long before it stopped being used in written works. It died when it stopped being spoken and stopped changing. I don't know if Fortran would be considered dead by the "no longer adapting" definition, but that it's still in use isn't proof it's alive.
- tclancy 7y agoQuid?!
- BjoernKW 7y agoI don’t think that works (which kind of proves the grandparent’s point). The appropriate interjection would probably be one of the following: Ecce?! Hui?! Vah?!
- eslaught 7y agoFortran's most recent spec update was in 2018... https://en.wikipedia.org/wiki/Fortran#Fortran_2018 https://en.wikipedia.org/wiki/Fortran#Fortran_2018
- jhbadger 7y agoBut Latin changed quite a bit even after it stopped being spoken as a first language. There are courses in reading Medieval Latin because it isn't that close to Classical Latin. In regard to Fortran, things are changing too. There's even a Fortran 2018 standard, which is fairly close to Fortran 2008, but would be almost unrecognizable to people who learned Fortran 77 or earlier.
- akiselev 7y agoLatin was in use by the Church well into the 20th century, until the Second Vatican Council in 1962.
- greglindahl 7y agoThat didn't end Latin being used by the Church.