Functional Fortran
wavebitscientific.github.io
wavebitscientific.github.io
Also, I've been told that FORTRAN makes it easier to write fast scientific code than C due to pointer aliasing (or something in those lines).
I’m not sure I would have been inclined to use something like functional FORTRAN when I was working on that stuff since mostly the models don’t change too much, and most new code is some kind of glue between parts.
Sure you could probably eke out faster code if you're a mentat and really good at C, or know the internals of a C++ compiler very well. But then you have to be good (and find good collaborators), and you pay the toll of dealing with pointers and memory management. I'm pretty sure I could stand up, say, a fast Gentleman's method using Fortran faster than in C++. And I'm certain I can get a large team of numerics guys to do, say, climate simulations faster and better in Fortran than C++.
Which makes sense when you recall ForTran = Formula Translator. It's literally designed as language where you should be able to write code that's one-to-one with your equations.
Fortran is an easy language to learn. A domain expert doesn't need to spend months or years to learn C++, they can write safe and performant Fortran code in almost no time.
People normally think of Fortran as being inscrutable spaghetti code, but for me using Fortran results in the cleanest, fastest code.
[0] Fortran arrays are 1-indexed by default, but can technically use any integer, including 0, or negative numbers. It's trivial to have, say, an array indexed from -7 to +7:
real :: array(-7:7)If you don't know Fortran, I wouldn't recommend you learn it to write a GUI app, but if you do know fortran and want to learn low level systems programming you can use it to write a GUI.
I've never seen any Fortran code in the wild that does that, though.