I'm a programmer skilled in both C++ and Fortran, and I'm considering which one to use for a new math project. I know it's possible to integrate Fortran modules into C++, but I'm wondering if it's really worth the effort. What are other people's experiences and recommendations?
5 Answers
If you're dealing with geometry or basic math tasks, C++ is definitely the way to go! It provides a lot more flexibility and is generally more applicable.
Honestly, it all boils down to your specific needs. If Fortran offers capabilities that are hard to replicate in C++, then sure, go for it! Otherwise, sticking with C++ might save you time and hassle.
It really depends on the math requirements you have. If you're looking to use specific libraries, like those from NASA that are in Fortran, it could be worth it to integrate them. Fortunately, modern Fortran can communicate with C, so you can get the best of both worlds. Personally, I avoid rewriting libraries if I can; they can be complex and if they work, I would hate to break them by modifying them.
I’d lean towards C++ as well. It offers more versatility and you’re probably going to find more applications for it in the future compared to Fortran.
Consider what type of project this is—are you trying to do this for fun or is it a professional venture? Also, are you planning to write the Fortran code yourself or leverage existing libraries? Think about the type of math you’re working with as well; is it more parallel or sequential? That should guide your decision.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically