5 ms·
Doctor Fortran in “The Future of Fortran”
- punch_card 12y agounpossible. DO 100 I=1,10 100 SUM = SUM + X(I) No longer supported ? hWhat ? And don't get me started about COMMON and EQUIVALENCE. To be blunt, FORTRAN 77 was probably the most practical language ever devised. What is this monster ? I predict more code written in FORTRAN 77 is being used today that all of the code written in later dialects. And this will be the same for the next 20 years.
- AlexeyBrin 12y agoNote that none of these will actually be removed from any compiler you are likely to use, but their use will be flagged if you ask for standards checking.
- QuantumRoar 12y agoFortran is still going strong. At a High-Performance Computing seminar I attended a few years ago, the speaker said that around 50% of high performance computing applications are written in Fortran (you know, these shiny little programs that can hog a million CPUs for a few hours or weeks or months). The other half being mostly C and C++. However, programming in Fortran is uncomfortable. Just like programming in C. The advantage of Fortran over C in High-Performance Computing is that it's less uncomfortable to write maths and things with arrays in Fortran. If you ever need to handle enormous arrays without breaking a sweat or solve systems of equations with hundreds of thousands or millions of variables, you can give Fortran a try. The syntax has come a long way since FORTRAN 77. Fortran's strength has always been speed. In the early days most Fortran programs would run faster than C programs. The trick is to intentionally leave out features that bloat the language such that all there's left in the language can easily be optimized by the compiler. Only after the C99 standard (I think), C caught up to Fortran in most applications due to stricter aliasing rules.
- yiyus 12y agoThe main reason Fortran is so extensively used today is not because of the merits of its new features but the incredible amount of (intrinsically complicated, but even more because it is highly optimized) legacy code. I guess that most of that 50% running in HPC is FORTRAN77 written many, many years ago, with a bit of Fortran90/95 and only an insignificant fraction of Fortran 20xx.
- drjesusphd 12y agoNo, Fortran is just plain fast. It's not just institutional inertia. Luckily there are things like Julia now that may eventually change the landscape.
- IndianAstronaut 12y agoCan Julia compete with Fortran and C? I still thought Julia still uses BLAS.
- KenoFischer 12y agoSo do Fortran and C. BLAS is written in assembly.
- drjesusphd 12y ago> I guess that most of that 50% running in HPC is FORTRAN77 written many, many years ago Is this blind speculation?
- yiyus 12y agoIt's a guess based on my limited experience.
- cbd1984 12y agoAssuming the FORTRAN77 was optimized for hardware circa a period when FORTRAN77 wasn't considered an ancient language, is it still optimized on modern hardware? Because it seems the vast increase in the relative importance of cache alone, not to mention the great changes in cache sizes, would make some optimizations fairly pessimal these days. (For example, loop unrolling blowing out I-cache.)