From: john@aquarius.unm.edu (John Prentice)
Subject: Modern languages: F90, C++, etc... (Was:scientists as programmers)
Date: Wed, 26 Aug 92 18:59:15 GMT
Organization: Dept. of Physics & Astro, University of New Mexico, Albuquerque

In article <9224001.1511@mulga.cs.mu.OZ.AU> fjh@mundil.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
>john@spectre.unm.edu (John Prentice) writes:
>
>>My final comment is my stock one about Fortran.  Continuing to
>>debate the pros or cons of Fortran 77 is a cheap shot, not worthy
>>of serious discussion.  Fortran 77 is out of date, everyone agrees
>>with that.  Fortran 90 is a modern language, with certainly as much
>>claim to that title as languages like C.  You can argue the merits
>>of some of what is in Fortran 90, and I would welcome such a
>>discussion.  But at least we would then be debating where the
>>scientific programming community is today, not where it was 20
>>years ago.
>
>Continuing to debate the pros or cons of C is a cheap shot, not worthy
>of serious discussion. C is out of date, everyone agrees with that.
>C++ is a modern language, with certainly MORE claim to that title
>than languages like Fortran, even Fortran 90. You can argue about
>the relative merits of C++ vs Fortran 90, and I would welcome such a
>discussion. But at least we would then be debating the languages of 
>today, not those of 20 years ago.
>
>:-) :-) :-)

I think a more interesting issue is not C++ versus F90, if one wants
to frame it as a versus sort of issue, but rather the general idea 
of OOPS versus conventional languages.  I happen to think there is
alot of merit in OOPS and I think it has an unquestioned place in
scientific computing.  However, I also think it is overhyped very
often.  For example, one of the common claims for OOPS being the method
of choice for parallel computing is that you can easily hide the 
underlying machine architecture from the programmer.  This is said
to be good because it relieves the programmer of having to worry about
that architecture and promotes portability.  The problem is that it
also promotes code inefficiency since the programmer, who understands
the data and logic structure of his code very well, is not able to
direct the computer to exploit that structure as efficiently if he
can't get to the underlying parallelization software.  The idea of
hiding the nature of the computer from the programmer is not a bad
one for users doing small computing, but it is not acceptable when each
of your calculations takes 50 hours of Cray Y-MP or CM time.  So
it is not that OOPS is bad, it is just that like everything, it has
a time and a place.

I would take the argument away from one over specific implementations
of these language ideas however.  One reason is that as soon as you
start talking about C++, you are going to get jumped on by real OOPS
purists who will tell you that C++ is nothing but some OOPS ideas
layered on top of a bad conventional language (and they are arguably
correct).  A real purist would insist on something like SmallTalk,
not C++.  The pros and cons of that argument aside, the point is that
there *are* some very important issues for scientific computing with
regard to the use of OOPS and we should be thinking about them, not
about language wars.

While we are at it, we should be talking about functional languages
also.  Their potential for applicability to scientific computing is
certainly as great as OOPS and possibily much greater.  So, if people
would like to engage in a discussion of conventional versus OOPS
versus functional, I would find it valuable and fascinating.

As for Fortran 90, X3J3 did a good job of producing a modern dialect
of Fortran which compares well with every other conventional programming 
language.  But unlike virtually every other language out there, Fortran 
is an evolving language.  Fortran 77 was a major change from Fortran 66,
with new programming ideas incorporated into it.  Fortran 90 is an even
more radical evolution.  Work is now going on for the next version of
Fortran and what goes into it will be a function of what the user
community demands.  Certainly, I would expect Fortran xx to encorporate
support of data parallelizm, perhaps control parallelism, and who knows,
perhaps even OOPS.   What other language is making those kinds of
evolutionary strides, and doing so in the context of international standards
which preserve code portability across large numbers of computers?
The ANSI version of C, for example, did nothing more than clean up some of 
the worst deficiencies of the original C, it introduced very little that 
was new.  So my point is, you can trash on Fortran for not being a
forefront language, and you would be largely correct.  But you also 
have to give it great credit for being the most dynamic of the major
languages (by which I mean languages in which people actually write large
programs), one which is contuously improving and evolving.

John
-- 
Dr. John K. Prentice                      
Partner, Quetzal Computational Associates    
3200 Carlisle N.E., Albuquerque, NM   87110-1664; 505-889-4543
john@aquarius.unm.edu -or- jkprent@cs.sandia.gov -or- prentice@rufous.cs.unm.edu