3 ms·
I used to code a lot in Fortran 77, but have been programming in Modern Fortran for the past few years (90, 95... I am not sure which standard I am adhering to
by hatmatrix 11y ago
I used to code a lot in Fortran 77, but have been programming in Modern Fortran for the past few years (90, 95... I am not sure which standard I am adhering to exactly). Both of these would also be considered fashionable.
Part of the reason is that it's still the standard in chemical engineering and atmospheric science for large-scale simulation where speed is an issue. There has been a long history of compiler optimization and numerical precision before standardized by ANSI C, and because of the simpler language (than C) it's easier for scientists to code up fast programs. Also because of its 1-indexing and array notation, it's easier to translate math to Fortran code.
With the recent module system there is a feature like Python's 'from module import *' ('use module') which when people use will make the code hard to follow, but when invoked with 'use module, only: var1, var2, foo, bar', you can make what's imported more explicit.
Other than that, I just find it very aesthetically pleasing and makes me very happy to code in it. I have heard they have string processing "as good as C" now, but I haven't used it much.
- jhallenworld 11y agoFortran used to be the standard language available everywhere. This led to weird things like text games and compilers being programmed in it. For example: http://jerz.setonhill.edu/intfic/colossal-cave-adventure-source-code/ http://jerz.setonhill.edu/intfic/colossal-cave-adventure-sou...
- hatmatrix 11y agoGood article describing Fortran's historical dominance: http://arstechnica.com/science/2014/05/scientific-computings-future-can-any-coding-language-top-a-1950s-behemoth/ http://arstechnica.com/science/2014/05/scientific-computings...
- whorleater 11y agoI've been learning Fortran 90/95 for my computational astrophysics class the language is proving itself to be surprisingly modern and capable, there's a lot of quirks coming from C/C++, but it's mostly syntax preferences and nothing huge. It's also very good at most of the problems that I've thrown at it which require high performance computing of some sort.