From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7a6a623afb38d7f7,start X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,94f5b26bc297a928 X-Google-Attributes: gid109fba,public X-Google-Thread: 1094ba,7a6a623afb38d7f7,start X-Google-Attributes: gid1094ba,public From: Jeffrey Templon Subject: Fortran vs C++ vs. etc (has little to do with realtime anymore) Date: 1997/09/12 Message-ID: #1/1 X-Deja-AN: 271881382 References: <199709070005.TAA23336@manifold.algebra.com> <5utbth$rdi@snews2.zippo.com> <34131554.73F2310E@roda.roc.servtech.com> <34157696.16620299@nntp.interaccess.com> <3415CE44.3BD531@calfp.co.uk> <341644F2.763D@BZZvnet.ibm.com> Organization: University of Georgia Department of Physics and Astronomy Newsgroups: comp.lang.c++,comp.lang.fortran,comp.lang.ada Date: 1997-09-12T00:00:00+00:00 List-Id: "Igor Chudov @ home" writes: > Brian Thomson wrote: > * a FORTRAN optimizer knows that A and B cannot be modified by the [ ... ] > * In C++ there is no such guarantee (unless you supply one > * outside the language via a #pragma), and it makes a noticeable > * difference in these matrix algorithms that are a big part of > * scientific programming. > > Well, the programmer of a Matrix class has to know what he is doing. > Making C++ code efficient may be harder than writing efficient fortran > code, but it is not impossible. This is a good point, but perhaps not in the way that Igor intended. One of the main reasons I tend to push Fortran (or something similar, like Ada or Python ... although maybe not everyone would see what I mean by "similar" here ;-) is that with stuff like C++, you *do* have to know what you are doing, or you will make a mess of it. The fact remains (and will for some time) that many scientific programmers are scientists FIRST and programmers SECOND. Turning the average physicist/programmer (at least in my field) loose with a C++ compiler is like giving your car keys to your eight-year-old. A few of them would actually be able to drive, but most of them would cause big damage trying. So one of my reasons for Fortran still being around: you can write a reasonable program which runs reasonably efficiently just by more or less typing in an expression of a simple algorithm. Fortran's "mental model" of the computer is very simple. JAT