As recently as 2015, people on the R developers mailing list were asserting that Free source form Fortran 9x is not portable. I don’t know what that meant. People wanting to use a more modern language than C or FORTRAN 77 to write R packages turned to C++, using the Rcpp package. The FortLearner project has re-implemented many machine learning algorithms in modern Fortran and claims speed-ups compared to Python’s sciKit-learn. There are other projects for deep learning. Maybe Fortran can make a comeback.
I have a lot of free-form Fortran codes that can be loaded into R. Never encountered an issue. Some existing R packages also have free-form Fortran codes. It’s true that the R community is pushing for C/C++.
This FortLearner project is very intriguing. Thanks for sharing. I would like to see many of its algorithms ported to std.
I also never had a problem with R and Fortran 90+. Maybe the R maintainers meant to say “you need to use F77-style interfaces in code that interfaces directly with R” ? For example, I suppose you can’t use assumed-shape arrays in the interface of a function that is called directly from R via .C or .Fortran.
Nowadays I tend to interface Fortran code with R via the .Call interface and a C wrapper, using iso_c_binding. That said the .dotCall64 approach looks good.