Automatic Fortran to C++ conversion with FABLE

Code available at: cctbx_project/fable at master · cctbx/cctbx_project · GitHub

1 Like

Nice figure from that article:

1 Like

Are there any tools that would translate C++ to Fortran? I imagine it would be significantly more difficult to develop such a tool.

That does not seem a fair comparison, at least between C and Fortran in numerical computing.

The large ellipses of C and C++ seem kind of biased.

People are usually most productive in a language they know well. Surveys among a lot of Python and C++ programmers are always biased to favor those languages.

Converting C++ to Fortran would probably be simpler if (when) Fortran has implemented templates. Also, Fortran does data encapsulation using modules whereas C++ mainly relies on its typing system (classes). It would probably be more efficient for a good programmer who knew both C++ and Fortran to read and understand the C++ program and then write an equivalent program in Fortran. Someone who could automate that process probably deserves some sort of AI award.

Interesting figure. If you cut out the options with poor runtime performance, you are left with Machine code (which almost no use for source code), Assembly (which is not too bad for RISC architectures, but really horrid for CISC targets like I86_64). C, which is a symbolic substitute for assembly language, a subset of C++ that is basically C, and Fortran. Fortran is the only one in the list I would consider a “high level” language.