Re: Ken & Klaus.

From: nessuno (nessuno_at_wigner.berkeley.edu)
Date: 09/17/04


Date: 17 Sep 2004 08:17:36 -0700

Robert Newson <ReapNewsB@bullet3.fsnet.oc.ku> wrote in message news:<414ABB87.7070100@bullet3.fsnet.oc.ku>...
> Jeff Relf wrote:
>

<snip>

I did a lot of Fortran programming, most of it Fortran 66 (!). The
older Fortrans were pretty awful by today's standards of what a
programming language should be. One problem in upgrading them was
that you had to introduce incompatibilities with previous versions to
change some things. For example, on going from Fortran 66 to Fortran
77, loop testing was moved to the start of the loop (in old Fortran,
all loops would execute at least once, unless you explicitly put in a
test to branch around them). I never learned Fortran 95, by then I
had switched to C. But it was obvious that in order to improve
Fortran 77, one would have to introduce further incompatibilities with
it. Once you've crossed this threshold, the question is, how far do
you go? If you're willing to go far enough in introducing
incompatibilities, you could transform Fortan exactly into C, maybe in
several steps if you wanted to do that. To me it seemed pointless.
Why not just use C?

Well, there's an answer to that, C, especially the original K&R C, was
not designed very well for numerical work. It was really a systems
programming language, not a numerical one. The attitude was, just get
it done, don't worry about efficiency. For example, the C rule that
all scalar floating arguments are by default double. Later C itself
was improved (also introducing some incompatibilities) and some of
these issues were met.

I used to make the same argument, that Fortran was better than C for
numerical work, especially simple programs where I just want to invert
a matrix and get the numbers out. That was because I had the rules
for Fortran in my head, and they're simpler than those of C, there's a
lot of machinery needed to get even a simple C program up and running.
 But now I prefer C for everything. I've found things like pointers
and passing small structures by value to be very useful in C, and to
add enormously to the clarity of the organization of even moderately
sized programs, including scientific ones. Of course, you could
probably do most of this with Fortran 95, which I never learned. But
one reason I never learned it was that I already knew C by this time.

Nessuno



Relevant Pages

  • 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: 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)
  • Re: Fortran now in the Great Language Shootout
    ... > representative of how Fortran compares to the other programming ... > languages than the current naive implementation in multiple languages. ...
    (comp.lang.fortran)
  • Re: Happy 7-8-9!
    ... symbol for a blank space - kind of a small b with a slash thru it. ... incarnations - usually with the year of it's coming into use, as in FORTRAN ... major language used for business programming - think Point of Sales - was ...
    (rec.crafts.textiles.needlework)