|
|
|
|
|
by noahl
4787 days ago
|
|
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.). 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. |
|
The only thing I absolutely hated about Fortran for parsing data files is that, according to the standard, a text file has to end with what amounts to an empty line. Many Fortran environments break this rule intentionally, but occasionally you'll find one that follows the rules. It inevitably bites people who forget that their last line of data must be followed by a newline, or else the line may never get read.