Fortran Arrays in C++

I’ve been writing an electronic structure code in Fortran for the past 22 years. And it’s an excellent language for this type of purpose.

The main reason is that I can hold up the mathematics next to the Fortran code and immediately see the connection. After all, FORTRAN originally stood for FORmula TRANSlation.

Add to this is the fact that even a novice can write very fast code and make it parallel, so that it can run on a cluster.

Furthermore, I can run code written in the late 1950’s on a modern Fortran compiler. Thanks to the work of the Fortran Standards committee, backwards compatibility is strongly enforced. Thus I can be fairly confident that our code will still compile and run decades from now.

If Fortran didn’t exist, then I most likely have written our code in C and not C++. The reason is that I want simple code which does complicated things, not the other way around. Linus Torvalds however, puts it better than I can.

4 Likes