5 ms·
As someone working with scientific codes in (relatively) modern Fortran, I agree that Fortran is still very strong in its niche. I don’t know any other language
by mfsch 8y ago
As someone working with scientific codes in (relatively) modern Fortran, I agree that Fortran is still very strong in its niche. I don’t know any other language that makes it as easy to write fast numerical codes, and it’s relatively hard to accidentally mess up the performance.
That said, I still find it very much feels outdated as soon as you veer off its core features. Handling strings is a major pain, writing short functions feels overly verbose, and proper testing is difficult. The language is full of arcane details that require reading up on best practices even for simple things such as defining the precision of your numbers.
So while Fortran still is strong in some areas, I do see it as an outdated language, just one that doesn’t really have a good replacement yet. Hopefully Julia can replace it for most use cases, or maybe Rust if they figure out their HPC story.
- vmchale 8y ago> or maybe Rust if they figure out their HPC story. Does rustc currently have the ability to implement the right optimizations? One of the big things that FORTRAN can do is prevent aliasing. Can you prevent aliasing in LLVM?
- steveklabnik 8y agoYes, through the “noalias” attribute. Rustc uses it, well, when it’s not buggy at least. It’s currently turned off pending an upstream fix; we’ll have it back on when it’s fixed.
- wocram 8y agoIs that the last thing blocking "fortran-parity" in rust? Is there a working group hpc would fall under? Last I checked there was no fast-math on stable, and #[repr(align)] was recently added.
- steveklabnik 8y agoI don't know enough about fortran to say, to be honest. > there was no fast-math on stable We don't do global flags to tweak things like this, as a rule. You can do it on indivudal operators, or use wrapper types, to get these behaviors.
- steveklabnik 8y agoOh, and there’s probably just be a new working group for hpc; we’ll have a process for spinning up groups early next year.
- kartickv 8y ago> I do see it as an outdated language, just one that doesn’t really have a good replacement yet Thanks for the perspective beyond the typical binary "X is good" vs "X is not good".