Slashdot Mirror


User: Bndar+Log

Bndar+Log's activity in the archive.

Stories
0
Comments
1
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 1

  1. Re:What is Fortran used for these days? on Fortran 2000 Committee Draft · · Score: 1
    Short answers:
    1. You use Fortran 90/95/2000 if you have old code in an earlier dialect, and you don't want to have to rewrite it from scratch.
    2. Yes. F90 has a portable way to do things like C structs (Vax Fortran 77 had structures, but they were a vendor extension). F90 has pointers, dynamic ("allocatable") arrays, a module facility, a portable way to specify precision for numeric types, whole-array operations, and other things. F95 added a few features that help with running Fortran on supercomputers. F2000 adds type-extension version of OOP, and other things.
    3. No, see 2 above.
    4. Fortran is evolving. Old features that are not used are being removed from the language; new features that wide experience suggests are useful, are being added.
    People claim that C/C++ compilers can be made to generate as fast of code as Fortran compilers, and that differences in performance are explainable solely as quality-of-implementation issues. This is not quite as true as you might think. The difference is that when a Fortran program uses aliasing, the program is not standard-compliant, and the compiler optimizer is free to botch your code. Experienced Fortran users know this, and write code without aliasing, and compilers make that code fly. In /theory/ with enough sweat, a C/C++ compiler could detect all the cases where aliasing isn't happening, and optimize as a Fortran compiler would. In practice, this doesn't happen, because Fortran users complain to the vendors when the optimizers break code, and C/C++ users mostly just take whatever they can get.

    That's not to denigrate C/C++ users --- it's just that the quality of optimization depends on what the standard language guarantees, AND on collective user expectations.