Re: F2003 complier, how far from us?





For OO programming, C++ is definitely better. However, matrix math in C
++ is more complicated, partly because there are many different C++
matrix implementations. In addition, OO programming is generally
slower, and most Fortran programs are aimed at high-performance. Most
Fortran programmers are not very interested in using OO for
computational code. Therefore, compiler developers are not in a hurry
to implement it. (At least that is my take on the situation.)

I disagree with a lot of what's written here. It's probably the case
that naive OO implementations are often slower than their procedural
counterparts -- primarily due to insufficient foresight and
insufficient understanding of how to write high-performance OO code.
One example of a massively scalable OO mathematical library is the
Trilinos library (http://trilinos.sandia.gov/). Trilinos scales
efficiently up to thousands of processors and is projected to scale up
to petaflops soon. Efficiency and programming paradigm are largely
orthogonal when done with great care.

I also think the statement that "Most Fortran programmers are not very
interested in using OO" is largely due to a war of attrition. Most
high-performance programmers who wanted to write OO code abandoned
Fortran a decade ago because it took so long for the language to
finally support OO. There are a few of us who stuck with it and
emulated OO in Fortran 95 while awaiting true OO in Fortran 2003. If
the compiler vendors showed less reluctance to move forward, Fortran
might be able to attract more OO programmers. As I've noted here
before, it appears gfortran will be ahead of most commercial vendors
in this regard soon. It's kind of sad that a group of volunteers is
putting a lot of large companies to shame, but I guess this isn't the
first example (cf. Linux).


If you are interested in OO programming as more of a data management
feature, or for creating a user interface, it may make sense to write
just the OO parts in C++. Then you can write the math code in Fortran,
and use C calls to join them together. IMHO, using Fortran for math
and avoiding it for non-math is a good programming model, which can
now be portable with ISO_C_BINDING.

F2008 adds features that improve the usability of type classes, so it
is possible that these features will become a higher priority.

.



Relevant Pages

  • Re: IF DEAD, GOTO 10-3-39
    ... mathematically its the exact same thing. ... The original topic was how FORTRAN finally ... made math computation easily manageable. ... I don't consider programming in assembler to be ...
    (rec.sport.football.college)
  • Re: A petition to J3 apropos FORTRANs future
    ... >> web programming, GUI development, and text analysis. ... >> may partially explain the small market share of Fortran. ... almost NO new code would be written in the language. ... time on the types of codes that scientists and engineers want and need to ...
    (comp.lang.fortran)
  • Re: Case sensitivity
    ... Academic field is not influenced by fashion to that extent. ... you won't find a program in Fortran. ... In fact, fashion is the major reason for the survival of Fortran, which is very tedious and inefficient for a lot of scientific programming despite the fact that it was originally designed for it. ... Although there were and are indisputably folks who don't like these standards, the fact is that the vast majority of implementors immediately adopted Forth-94 and have been very happy with it. ...
    (comp.lang.forth)
  • Re: programing with science jobs
    ... and not do some programming these days. ... As a freshman physics or math sudent, ... once you learn the basics using BASIC. ... There is still lots of FORTRAN code out there (I don't know about ...
    (sci.physics)
  • Re: Fortran compilers for multi-core chips
    ... >multi-core chips. ... >Will Fortran programs need to be written differently to maximize speed? ... Let me also recommend "Programming with Hyper-Threading Technology" by Richard ... Gerber and Andrew Binstock - Intel Press, ...
    (comp.lang.fortran)