3 ms·
MANY physicists still code in fortran. Its blazing fast for the numerics they do and pretty simple to learn. I personally would just teach them C, but there a
by maximilian 18y ago
MANY physicists still code in fortran. Its blazing fast for the numerics they do and pretty simple to learn. I personally would just teach them C, but there are sooo many math libraries written in Fortran that it has a lot of momentum in the physics community.
- quantumhobbit 18y agoOld joke: Q:What will the scientific computing language of the 1980's but like? A:I don't know but it will be called Fortran. My undergrad physics department taught a course in Fortran because the Comp Sci department refused to teach it. It's only been a few years but I think they are still teaching it. Fortran is nearly as fast as C and far easier to use than C, so there hasn't really been a drive to switch the huge amount of Fortran code out there to C. I think that if anything kills off Fortran it will be Python or something similarly easy to teach to undergrads.
- etal 18y agoYep, my school recently started teaching Python as the intro programming language -- for the bioinformatics program, at least. C, C++ and Fortran have similar enough characteristics and capabilities for scientific work that once a researcher has learned one, there's not much benefit to learning either of the others. But scripting/glue languages make it possible to hack together something in an afternoon that's impressive enough to get another scientist's attention and perhaps consider that languages do matter. I think Python will convince new scientists that C++ and Fortran deserve to be replaced, and another fast, easy-to-parallelize language will be the actual replacement.
- hugh 18y agoI'm not convinced that Fortran has any remaining advantages. Sure, a bunch of libraries (BLAS and LAPACK in particular) may be written in Fortran, but that doesn't mean you can't call them from C. Maybe there are some uncallable-from-C libraries out there that I don't know about, but I'm pretty sure the only reason physicists still use Fortran is that they have old legacy code (and/or old legacy collaborators). I use Fortran every day, and I can't stand it. But it's quite common to find physicists, even young ones, who only know Fortran.