Remix.run Logo
▲ otterdude 4 hours ago

Fortran while historically important doesn't really seem like a good choice today.

I worked with a proprietary jet engine analysis software suite written in Fortran 77 and It felt very primitive, albeit fast.

Today I feel like C is a much better choice for speed and readability.

If you really need the fastest performance I dont think Fortran gives that much of an advantage writing assembly.

▲jleyank 4 hours ago | parent | next [-]

With vector machines, Fortran yielded (much) faster code because (a) there was a whole lot of work on preprocessors for "dusty deck" code and (b) the lack of pointers and their overlap let the compilers do their stuff. C code needed a lot of #pragma's to let it know that some pointers didn't overlap and so could be optimized.

We found it best to to the front-end and I/O of the code in C and the compute in Fortran. Fastest calculations especially with those tailored libraries.

▲crassglassass 4 hours ago | parent | prev | next [-]

Aren't most people doing this kind of work these days engineers using matlab?

▲mohamedkoubaa 3 hours ago | parent | prev [-]

Fortran invented array-based programming, which arguably numpy advanced and now Julia finally perfected

▲Athas 2 hours ago | parent [-]

Fortran had arrays since the beginning, but it wasn't really for "array-based programming" except in a trivial sense, since expressions could not produce arrays. APL is the language that invented first-class arrays, and is far more advanced at it than most of its successors, particularly including NumPy.

Modern Fortran has pretty serviceable support for array programming.