Hacker News new | ask | show | jobs
by hpcjoe 1923 days ago
I've been a Fortran user for (gawd help me) 35 years or so. I can say that rumors of its demise are greatly exaggerated.

There are many languages, and language fads. Fortran was never sexy, never faddy.

My research codes from 30+ years ago still compile w/o issue to this day, and run, on my linux laptop. Even using the big endian data files (gfortran has a nice switch for that).

I don't really use it actively anymore. But I know many who do. And when I hear others say "X for scientific computing", I've got to chuckle a bit. C++ code I wrote 15 years ago won't compile today. Python ... the language changes within minor versions (ran into this at work last week, with 3.6.8 being sufficiently different than 3.9.x that I had to rewrite a number of functions for 3.9.x).

I've not had to change my Fortran. Or my 25+ year old Perl. They just work. Which is something of a base requirement for scientific code. If you hand someone a code base, and N months/years later, it doesn't work ... that helps no one.

3 comments

> C++ code I wrote 15 years ago won't compile today

Do you recall specifically why?

Also, isn't C pretty 'time proof'? The only time I've seen old C fail to compile was when dealing with a real relic of a codebase. If memory serves it used the pre-standardisation parameter-declaration syntax:

    void my_func(x, y)
    {
        int x;
        long y;
    }
It's perhaps worth saaying that 30 years ago code in the wild might well not have compiled and run correctly on a different system, and is more likely to today. There tended to be more non-standard features and ignoring of the standard -- specifically storage association and order of evaluation rules, which people who hadn't read the standard would swear weren't in it. Also, there are a few things which have been dropped from the standard, though not necessarily from compilers.
COBOL is another one. COBOL programs written decades ago are still running unchanged on mainframes today. (Not that it was ever used for scientific computing.)
I recall reading on HN a while back that a modern z/OS mainframe can run unmodified System/360 binaries.
Well, there was the shocking news here not long ago that some OS\360(?) backwards compatibility had been dropped. What's the world coming to.

Relevant to Fortran, there's a version of ESSL that I recall on OS\370 now for POWER9 (and doubtless 10). Scientific subroutine libraries are arguably the best example of the re-use beloved of those who haven't seen their OOP code last decades.

wine can also run unmodified windows binaries
Yes and if those windows binaries were from a platform from over 50 years ago then perhaps your snarky quips would come off as intelligent.
Windows 3.1, released on April 6, 1992 - so only 29 years old.

My bad, the 21 years difference must be important (somehow?)