Re: F2003 complier, how far from us?
- From: Damian <damian@xxxxxxxxxx>
- Date: Mon, 25 Aug 2008 13:57:52 -0700 (PDT)
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.
.
- References:
- F2003 complier, how far from us?
- From: Simulate
- Re: F2003 complier, how far from us?
- From: Joe
- F2003 complier, how far from us?
- Prev by Date: Re: ordering integer array
- Next by Date: Re: Surprise
- Previous by thread: Re: F2003 complier, how far from us?
- Next by thread: Re: F2003 complier, how far from us?
- Index(es):
Relevant Pages
|