4 ms·
In the late 90s I remember a saying roughly "I don't know what language scientists will be using in 20 years, but it will probably be named Fortran"
by aidenn0 7y ago
In the late 90s I remember a saying roughly "I don't know what language scientists will be using in 20 years, but it will probably be named Fortran"
- dlivingston 7y agoAs someone professionally involved with computational physics / geophysics, I can vouch that Fortran is still heavily used in these domains. EDIT: for a modern, relatively new and highly-used scientific codebase that uses Fortran90 exclusively, see PFLOTRAN: https://bitbucket.org/pflotran/pflotran/src/master/ https://bitbucket.org/pflotran/pflotran/src/master/
- retrovm 7y agoRelated saying: a scientist can write a FORTRAN program in any language.
- airstrike 7y agoThat is witty on so many levels I'm simply in awe
- leephillips 7y agoThe quote is from Tony Hoare, winner of the 1980 Turing Award, in 1982. https://arstechnica.com/science/2014/05/scientific-computings-future-can-any-coding-language-top-a-1950s-behemoth/ https://arstechnica.com/science/2014/05/scientific-computing...
- the_af 7y agoI also like the saying "you can write FORTRAN in any language".
- sampo 7y agoAfter Fortran got its array syntax 29 years ago, there aren't many languages that you can use to write array-manipulating code like in Fortran. Maybe just Julia and NumPy?
- badrequest 7y agoWhat are the highlights of Fortran's array manipulation capabilities?
- myrryr 7y agoWell, things like... you have 2, 2 dimensional arrays of the same size, A and B. You want to make a new array, where each cell in A is added to the same cell in B. So you are going to do a loop over 2 variables, right? in FORTRAN the code is... C = A + B in Julia the code is C = A .+ B
- the_af 7y agoInteresting. Does it result in a compile error if you try arrays of different sizes? (If it's just a run time error, I don't see how it's different to implementing this with operator overloading in any language that supports it).
- palae 7y agoSure, if you try with non conformable arrays, gfortran for example would tell you something like this: Different shape for array assignment at (1) on dimension 1 Note that a scalar is conformable to any array, so that A = 2 for example would work for any shape of A, and would fill A with 2's.
- nwallin 7y agoThat's what I do in C++ with Eigen or boost::ublas or any other library. Operator overloading is not a feature limited to Fortran. Fortran gets its performance from prohibition of aliasing, which is something that C++ admits as per the standard. One could enable the same performance boosts with a non standard compiler flag, but this breaks a lot of codebases, including the Linux kernel AFAIK. Aliasing is a pox upon the world. There's a lot of work gone into stuff like UBSan for C++. I think aliasing should be added to stuff that it checks for. Dunno how much overhead that would be though.