by CyLith · 2w ago · 0 comments
We're not talking a language trapped on obsolete hardware. We're talking something that is still in regular use for any numeric tower, because that is what it is good at.
If you touch floating point, ever, there is a good chance the library used for processing it is a maintained, probably fairly modern, Fortran codebase.
The whole "I rewrote X in Y" is mostly about career building, gathering Y portfolio, to jump ecosystems.
Now it doesn't matter any longer, it is one natural language paragraph away, what the output language should be.
With Fortran it's 1) and 2).
As I understand it, Fortran outperforms other languages for problems like matrix math, especially if you care about issues like portability and memory use.
Not only is Fortran designed for those problems, but the there's been a lot of thought, time, effort, and money used to make the generated code go fast.
You can eventually obtain the same performance in C++ like in Fortran, by defining your custom array types, with a complete set of operators and functions for them, possibly using inline assembly or SIMD intrinsics for implementing trickier operations. The same may be true for other programming languages that are extensible enough.
But just replacing Fortran with another currently popular programming language is not sufficient, without some extensive support libraries.
The languages that are extensible, like C++, allow the definition of custom data types and of operators for them, with which the defects from the language specification can be compensated.
But that means that it is not enough to choose a programming language to replace Fortran, but also a set of libraries that would provide facilities at least as good as those provided by default in Fortran.
Such libraries introduce additional dependencies, so the choice is not simple.
Julia is one of the very few programming languages that has been intended for the same domain of applications as Fortran, but Julia has made some controversial design choices and it is doubtful that there are many cases where substituting Fortran with Julia would be a definite improvement in comparison with using the latest Fortran standard.
Also lets not forget that the beloved C is only about 10 years younger.
The preliminary Fortran specification was written in 1954, while the first version of C is from 1974.
The first Fortran implementation is from 1956, but that was not yet a complete high-level programming language, because any complicated functions and subroutines had to be written in assembly language.
In 1958, "Fortran II" added the features required to write any functions and subroutines also in Fortran, so that can be considered the first complete implementation.
Even when considering the first complete implementation, not the first written specification, C would be 16 years younger.
Even if modern Fortran compilers can still compile old Fortran programs, when writing a new Fortran program that would resemble very little with the original Fortran.
Early history:
1951 – Regional Assembly Language
1952 – Autocode
1954 – IPL (forerunner to LISP)
1955 – FLOW-MATIC (led to COBOL)
1957 – FORTRAN (first compiler)
1957 – COMTRAN (precursor to COBOL)
1958 – LISP
1958 – ALGOL 58
1959 – FACT (forerunner to COBOL)
1959 – RPG
1960 – COBOL
[…]
* https://en.wikipedia.org/wiki/History_of_programming_languag...FORTRAN, LISP, and COBOL are probably the big three 'legacy' languages still being used. BASIC was in 1964.
In fact, it is so far back, that the standard dropped support for the syntax, and changed semantics of the empty parameter list.
After 49 years, to keep your 1974 date, not the youngest reaching half century of age.
Also I mentioned about, not exact time period.
I know, if it aint broke... but it feels like something has been lost if we are using code that no one alive knows what it is doing. I suppose that is the AI future.
had to maintain simulations which hot loop was written in fortran. i learned the hard way why they are in fortran..
What kind of high level abstraction do you feel is too unergonomic to use?
You get as much ergonomics as a language like Zig, that gets praises all over the place.