Hacker News new | ask | show | jobs
by enriquto 83 days ago
> why fortran?

why not? the language is straightforward and loops are fast. It is portable and your code will work unchanged for the next 50 years. It may be a bit verbose, but that's not a big deal with today's tooling.

4 comments

Fortran will survive the cockroaches even, when the world 404s
Yea na, Fortran is pretty compiler dependent and there are a lot of compilers. Already old Fortran code used all sorts of now-dead proprietary compilers and can take a huge effort to get it to compile on modern compilers or even modern computers. Modern code might use Gfortran which sometimes makes breaking changes so that's not an option. Perhaps if everyone uses the latest shiny new Flang or whatever, then it'll finally last 50 years? Not likely, given the history.
For a standardized language, Fortran isn’t very portable across compilers. GNU Fortran has done a great job supporting legacy features, and I hope that our work in flang-new has made it easy to port to, as well. I basically ignored the zealots who wanted flang-new to be a strict compiler by default. The hobbyist project LFortran is quite the opposite, and will yell at you by default for perfectly conforming variations in keyword spelling. For those who like that sort of thing, that’s exactly the sort of thing that they like.
Your code will work unchanged until you try to change compilers or your compiler adopts a J3 breaking change to the language.
> your compiler adopts a J3 breaking change to the language

Like all the 3 of them they added in the last 30 years, and that compiler vendors are not enforcing anyway because they don’t want to annoy their users?

Windows’ backward compatibility is a joke compared to Fortran.

We're definitely enforcing some of them. But the latest one from F'2023 isn't going to be.
Great, can we see some benchmarks?
Cobolsky holds the record for most surprised looks per line of code :)

Fortransky benchmarks pending

the feed scorer will have real numbers worth reporting

Whenever time allows in future: Fortran vs Go vs Python