The article mentions: "I think that having to use C++ Functors was about the tipping point in our 25-year adventure with C++. Ranges and the foreach loops make our D code so much tidier than our equivalent C++ code."
It almost sounds they were stuck writing C++98 code and instead of moving their coding standard to C++17, they chose to rewrite in D.
> It almost sounds they were stuck writing C++98 code and instead of moving their coding standard to C++17, they chose to rewrite in D.
I think they started their port before C++17 was standardized:
> Also in 2010, a couple of us (PAJ and RJG) living in different parts of the world (Queensland, Australia and Virginia, USA) came across the D programming language ....
> In 2014 we got serious about using D for the next iteration of Eilmer and started porting the core gas dynamics code from C++ to D. Over the next four years, ....
I'd suspect most of the advantages were from the move away from C++, for two reasons. First, the C++ version was a rewrite of the C version. Second, they had new graduate students working on the code, not professional software developers.
My impression is that rewrites are rarely worth the effort and it's better to improve on what you have, but this is the business economics perspective. It sounds to me like this is essentially a research hobby project that kept growing? The authors have managed to keep their interest in the project by being able to rewrite the code while avoiding previously made architectural mistakes and having fun while doing it? Is this a fair take or am I underestimating the advantages? To be clear, I read the blog post and there have definitely been tangible advantages and they are still enjoying the language 6 years in so it looks like they made a good choice.
"This simulation program, originally called cns4u, started as a relatively small C program that ran on the Cray-Y/MP supercomputer at NASA Langley Research Center in 1991."
and the abstract for the 1991 report they link reads in part:
"The unusual features of this program are that it is written in C and makes extensive use of sophisticated data structures to encapsulate the data. The idea of writing the code this way is to make it easier than traditional FORTRAN codes to parallelize for the Multiple- Instruction-Multiple-Data style of parallel computer."
so pretty clearly it's always been a professional academic research project. This means you have severely misunderstood the context in which this code was written: they didn't maintain interest in the code because they could use a fancy language, they did it because it was integral to answering questions that they were paid to investigate and that they've dedicated decades of their life to study.
My impression is that rewrites are rarely worth the effort and it's better to improve on what you have, but this is the business economics perspective. It sounds to me like this is essentially a research project that kept growing? The authors have managed to keep their interest in the project by being able to rewrite the code while avoiding previously made architectural mistakes and having fun while doing it? Is this a fair take or am I underestimating the advantages? To be clear, I read the blog post and there have definitely been tangible advantages and they are still enjoying the language 6 years in so it looks like they made a good choice.
You seem to still be stuck on word usage, so I rewrote my comment to focus on what matters. Do you still disagree with what I write, if yes what do you disagree with?
> they didn't maintain interest in the code because they could use a fancy language, they did it because it was integral to answering questions that they were paid to investigate and that they've dedicated decades of their life to study.
Which they could have done in C++ as well since they already hade the code in C++, only it would have been a more painful process. But they could have rewrote the project in C++ as well for example, was this not a viable approach? If not, why? I believe there is a difference between research code and business code, where researchers have more freedom to choose languages that suit their projects rather than focusing on output.
See, the content of your post is formed by the words you choose. Which other words are contradictory (or at least not necessary) to what you are trying to say? And what is it you are trying to say? It's really hard to find that out for us if you yourself aren't sure about that.
It almost sounds they were stuck writing C++98 code and instead of moving their coding standard to C++17, they chose to rewrite in D.