by xioxox · 2y ago · 0 comments
Although Fortran is good at arrays, it is terrible at any other kind of data structure. You don't get a standard set of useful data structures (e.g. associative map, k-D tree). Unless you like implementing such stuff, you have to look through a bunch of possibly-working half-implemented codes found using google.
For something focused on numerics, it's lacking in standard IEEE numerical things such as a function to check for nan (GNU extension?!). There aren't an easy ways to do SIMD, excepting hoping the compiler does it for you. There aren't even standard numerical constants, so you get the joy of defining your own PI and hoping it doesn't clash with someone else's.
Strings in Fortran are beyond awful, even with the new ability to reallocate string length.
Then we come to the compilers. The commercial ones may be ok. I know the free ones are very buggy.
The IEEE_ARITHMETIC module has been part of the Fortran standard since Fortran 2003, and includes, among others, the IEEE_IS_NAN() function.
(Supported in GFortran since version 5: https://gcc.gnu.org/gcc-5/changes.html)
Well, C does not have those, either... (I would not call using C "pretty awful experience" though.)