Fortran needs a good compiler, that is why I started LFortran some time ago:
https://lfortran.org/blog/2019/04/why-we-created-lfortran/
and there is also Flang. Both Flang and LFortra are in development. GFortran is currently the most advanced open source compiler.
See our page for the list of all compilers:
Most of these tiny programs do at-least compile with ifc —
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
— fewer of them compile with gfortran —
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
— and fewer still compile with flang —
https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
No doubt there's something ifc specific about the programs, or something obvious to a Fortran programmer but…
Edit: plus to ship our code to others requires a free good quality compiler. In the C/C++ world, that is standard. In fortran, that is not the case.
Regarding C and C++ compilers, for the same reasons most high performance HPC computers use Intel, IBM, PGI compilers instead of plain gcc or clang.
I don't think commercial/open source is the key here: on the fortran side we have been long suffering from a lot of bugs/regressions with the current versions of intel fortran (with respect to the "latest" features like OOP) -- I would even say that they could be more than we are finding in gfortran.
An explanation could be that they are investing time in supporting their big customers that likely use ancient code bases.
gfortran also does not do GPGPU.
It was quite surprising to find out the lack of understanding from Khronos that CUDA supports Fortran out of the box, during OpenCL 3.0 Q&A session.
I can code with CUDA in many more languages than fortran. If I wanted to use gfortran, I just would make a wrapper to CUDA with C++.
Yet, inline assembly is not part of ISO C.
Or one that generates lousy machine without full advantage of the CPU vector units.
Yet, vector instructions are not part of ISO C.
I also don't expect e.g. Ruby to have libraries for AAA game engines, or Erlang to have numeric libraries.
Most of the fortran codes I'm working on would be much simpler with a common libraries to do things like that.
Fortan is pretty painful to write in. The lack of an STL means writing algorithms yourself. There is no good set of libraries, so you have to write more stuff yourself.
The string support is horrendous. Most of the language is based around clumsy fixed size strings. I wish they would add a new flexible string type.
The compiler quality is not up to C++ standards. My code currently has some nasty workarounds for problems in gfortran. It's not good to keep discovering compiler bugs.
I also find it's much vaulted numerical capabilities overstated. Vectorization only works in simple cases. You can't drop down to using SIMD wrappers to fix this. It's nice to be able to pass arrays around more easily than C, however. A good C++ array library would be better, but that would require everyone to agree on one.