Remix.run Logo
xmcqdpt2 5 days ago

Fortran is pretty great:

* First-class tensor manipulations (like numpy but in the core language)

* Fast math with the right compiler

* Automatically sized multi dimensional arrays on the stack

* Zero cost C interop

* Minimal runtime, no GC, compiles to small programs

* Generics

* Coarray based parallelism in the core language

Sure it has issues but if you want to write fast numerical code and don’t want to bundle 2GB of pytorch or however big the Julia standard library is, or you want to make a small library with a C API, it’s a pretty great language. There are 50 year old libraries that still work perfectly (and much faster than they did then!) You won’t get that kind of longevity out of Rust ndarray.

pklausler 5 days ago | parent [-]

Having written one, I'd like to disagree with the "minimal runtime" point. Fortran's I/O system, intrinsic procedures, memory management, and derived types need a lot of code in the runtime support libraries.