Hello, Fortran world!
Matthias Noback
program hello_world
implicit none(type, external)
print *, 'Hello, world!'
end program hello_world
Since January 2024 I’m working with a smart group of programmers at Deltares. They create and maintain software in the complex “business” domains of hydrodynamics, morphology, water quality and ecology. Their software is used to understand and predict all kinds of phenomena related to water, by which they “Enable Delta life”. And that’s not just for the Netherlands (many of us here live below sea level or close to rivers); the software is used around the world, by governments and businesses.
I think this is very cool. Unfortunately, I lack a big part of the domain knowledge needed to work on the code. But I do have quite some experience working with IT teams, improving the design of existing (legacy) code bases, introducing testing and TDD, pair and mob programming, etc. I’ve been working almost only in the world of web development, so crossing over to this domain of physics-based, high-performant software turned out to be quite the leap. On top of that, the software is mostly written in Fortran…

Fortran is a fascinating language. What everyone knows about it, of course, is that it’s very old. And the code bases created with it are large and unmaintainable. “It needs a rewrite in a modern language.” I have always encountered people sceptical of PHP for the same reasons: it’s old, it’s easy to create a mess with it. As you all know, these opinions are lagging behind. And the same goes for Fortran. The language has evolved, and as it goes: old and bad things are still allowed for backward compatibility (indeed, Fortran code bases tend to be old and large, so hard to update). But we can certainly write “Modern Fortran” today!
After working with the team at Deltares for a year, I switched roles: this year I’m designing and teaching an 8-part custom programming course. Every 6 weeks we get together for a full day, to explore relevant programming concepts. The workshop format is to cover a bit of theory from the rich set of object-oriented (OO) and functional programming concepts (FP). We then look at specific Fortran language elements needed to implement these ideas, and finally do some coding assignments to create a habit of doing new things with this old language.
In my experience, you’ll often need more code to accomplish something that would be really easy in other languages that are specifically marketed as “OO” or “FP”. There’s always some translation needed. The language is quite verbose. You’ll run into surprising behaviors. And some things just aren’t possible.
While designing the courses, I’m making a serious effort to learn Fortran. And while translating OO and FP concepts to Fortran, I’m running into interesting things. I think it will be useful to share my findings on this blog.
In the next post, I’ll show you how to get started with Fortran programming on Linux and Windows machines.
By the way, I understand you as a reader may only be interested in PHP or general-purpose programming-related content. I’ll look for a way to get an RSS feed for just a specific category of posts.
Also, I’m not “gone” from the PHP world. I still do presentations at conferences and teach workshops (online or in-company).