Slashdot Mirror


Is GNU g77 Killing Fortran?

goombah99 asks: "I've come to believe that the existence of GNU g77 (and f2c) is holding back Fortran development. You might think that a free-ware compiler would be good for promoting the language. But it's not because the GNU flavor does not implement the de-facto standard DEC extensions to the language that give it dynamic memory allocation, pointers, and data structures. Without these Fortran 77 is indeed barbaric, but with them it is quite pleasant to work with. The problem is everyone writing new code is now afraid to use these commands in because of the desire to have their applications compilable by the teeming masses who may not want to pay $500 to $1000 dollars for a professional Fortran compiler (all of which do implement the DEC extension). F95 is being held back by the same considerations. Do you agree? Does anyone have some library extensions or pre-compilers that provide these capabilities to g77?" Are the DEC extensions so widespread and common that language survival is dependent on their inclusion, as the submitter suggests, in "every professional compiler". Assuming there aren't comparable features already available in g77, are there plans on eventually implementing similar?

6 of 195 comments (clear)

  1. Want "modern" features? Don't use F77 by GuyMannDude · · Score: 4, Insightful

    But it's not because the GNU flavor does not implement the de-facto standard DEC extensions to the language that give it dynamic memory allocation, pointers, and data structures. Without these Fortran 77 is indeed barbaric, but with them it is quite pleasant to work with.

    You can mock Fortran 77 all you want but the "barbaric" striped-down version can be highly optimized. And for a lot of the legacy scientific code out there, you just don't need dynamic memory allocations, etc. If you really do need all these fancy, modern features, why the hell are you using Fortran 77? Fortran 77 is a simple yet highly effective, stripped-down language that is appropriate for a limited number of applications. But it does those applications really damn well. Don't blame Fortran 77 if you're trying to use the wrong tool for the job.

    GMD

  2. Oh come on by BoomerSooner · · Score: 4, Insightful

    You can develop software in any language. Fortran, C, Visual Basic, Assembly, ...

    99% of the problem is the programmer not the language. Every language has an advantage in its specific area. VB/Delphi Quick & Dirty Interface or Prototype (quick development time). C/C++ Portability & Speed of Program. Assembly True low level programming. Wait what is fortran used for again? (lol just kidding). Excellent math modeling for quick and dirty precision calculations (I'd still use C because I've never used Fortran).

    I guess g77 is holding it back because that is one of the reasons I've never used it. I thought there was a Fortran 85 or 90 spec as well?

    Boomer Sooner (way to choke one off early Tejas)

  3. So little logic from a programmer by Crashmarik · · Score: 4, Insightful

    How can anyone think that the free availability of a vital resource impedes the progress of anything ? Is the availability of free C,pascal,forth etc implementations killing off those languages. Is the availability of GCC for win 32 stopping anyone from using Visual C ? Is the availability of freepascal killing delphi ?

    The answer is no. A free implementation of fortran makes it that much easier for the language to be taught. If there are people that know the language they will use it. If people use the language it will grow and develop.

    If you wan't to know what's hurting fortran you might try readin Dijkstra's "Goto Considered Harmful".

  4. Re:Flame on! -- wrong perspective by Alinabi · · Score: 4, Insightful

    You are looking at the issue from the wrong perspective. Unlike a software engineer, scientists does not consider the software they write a final product. Their product is the result of the computation performed using the software. That's what brings them grant money. Thus, they would like to spend as little time as possible writing software and dedicate most of their time to interpreting those results. Since most of the numerical libraries out there are written in FORTRAN and that they are already familiar with the language, I think FORTRAN will remain their darling for a long time. It's a fact of life, not a matter of policy.

    By the way, most of them use commercial compilers rather than g77, because they need the optimizing features which g77 does not provide (think parallel computing).

    --
    "You can't allow somebody to commit the crime before you detain them." [Condoleezza Rice]
  5. Re:10 GOTO 20 by jaoswald · · Score: 4, Insightful

    Sure, but it expands into C++ code. You still need a very wise C++ compiler to turn this into efficient machine code.

    A decent Fortran compiler knows more about the original statement than the C++ compiler can, and also, a Fortran compiler's number one reason for existence is to optimize array accesses.

    A C++ compiler is lucky to correctly compile all of the heinous complexity of the C++ language, much less aggressively optimize this type of array access.

    I'd be much more impressed if the poster had shown the resulting machine code.

  6. In other news by Chelloveck · · Score: 4, Insightful
    But it's not because the GNU flavor does not implement the de-facto standard DEC extensions to the language that give it dynamic memory allocation, pointers, and data structures. Without these Fortran 77 is indeed barbaric, but with them it is quite pleasant to work with.

    Yeah, there's a lot of that going around in the open source world. I've heard of this other project that's stifling growth in a major segment of industry by not implementing the de-facto standard extensions that its commercial competitor uses. You might have heard of it, it's called Mozilla.

    I admit that I haven't touch FORTRAN since about 1985, so forgive me if I'm not exactly up on the state of the art. From a little googling, it looks to me like g77 is pretty much an orphaned project. This is free software, man, developed and supported by the community. Have you considered volunteering to fix the parts you think are broken? Or volunteering to work on the f95 compiler effort?

    --
    Chelloveck
    I give up on debugging. From now on, SIGSEGV is a feature.