Re:Flang: The Fortran frontend of LLVM [video]
by fctorial on Sunday February 09, 2020 @09:01AM
(#22282124)
I've never seen a fortram codebase in my life. Is it still alive? What advantages does it offer over C/C++?
[ Parent
| on HN ]
Re:Flang: The Fortran frontend of LLVM [video]
by ufov2 on Sunday February 09, 2020 @09:37AM
(#22282279)
Fortran has language-level support for things important for numerical scientific computing (complex numbers, multidimensional arrays, etc.), and it has had them since the beginning in the 1950-60s.
The convenience is not really matched by C or C++, where similar features have been added much later by language extensions or 3rd party libraries, resulting to more complicated usage, fragmentation, and interoperability problems. Newer languages also have similar issues, so for the user base that uses Fortran, there's a lack of viable competitors.
Re:Flang: The Fortran frontend of LLVM [video]
by PaulHoule on Sunday February 09, 2020 @09:55AM
(#22282393)
Also numerical codes can be trickier to write than you think. Rounding errors and other treacheries of the floating point approximation to the 'real' numbers can eat you alive.
If you want to do common numeric operations they might be a FORTRAN code that is battle tested and performance tuned and it usually not hard to call from C, Java, Python or some other language.
Re:Flang: The Fortran frontend of LLVM [video]
by stephencanon on Sunday February 09, 2020 @10:00AM
(#22282414)
Fortran’s numerics model is actually somewhat weaker than C’s; if precise rounding behavior is your main concern C (while still not ideal) is a better option.
Re:Flang: The Fortran frontend of LLVM [video]
by gnufx on Sunday February 09, 2020 @07:43PM
(#22285467)
For those of us not expert on the standards, could you explain in what way Fortran is weaker, and its rounding control deficient?
Re:Flang: The Fortran frontend of LLVM [video]
by lloda on Sunday February 09, 2020 @11:48AM
(#22282956)
I write mostly C++ and Scheme and last year I wrote my first piece of code in modern Fortran (I had some experience porting/integrating old F77 libs). It's trivial to interface with C and lets you do numeric stuff immediately and without libraries using a plain syntax. Compared to C++ with template array libraries it compiles much faster and doesn't get in your way nearly as much. It has a module system... Compared to numpy/matlab/etc it takes some adjusting b/c it's still a lowish level language (errors lead to segfaults, etc.) but a lot less than going to C/C++.
Re:Flang: The Fortran frontend of LLVM [video]
by cygx on Sunday February 09, 2020 @09:09AM
(#22282159)
It's still around in the high-performance scientific computing world. Feature-wise, C99 basically looks like playing catch-up with Fortran to better compete in that space (eg restrict, complex numbers, type-generic math functions, stack-allocated variable length arrays).
Re:Flang: The Fortran frontend of LLVM [video]
by gnufx on Sunday February 09, 2020 @10:47AM
(#22282627)
Every time Fortran is mentioned, this seems to come up. In one thread I referred to the usage figures for the UK "tier 1" system, for instance.