Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.fortran Subject: Re: What is the FORTRAN for ? Message-ID: <58098@lanl.gov> Date: 25 Jul 90 21:51:43 GMT References: <11029@chaph.usc.edu> Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 63 In article <1990Jul25.174153.16896@ecn.purdue.edu> moshkovi@cn.ecn.purdue.edu writes: >Please, don't consider my question offending, but why the hell in this world >you people still using FORTRAN People use Fortran instead of C for the same reason that people use English, French, or German instead of Esperanto. One: its a better, more expressive language (for the uses for which it is intended). Two: there is a large body of material already written in the language which would be difficult (and undesireable) to translate. Fortran vs. C has another feature which is not present in the natural language analogy (or maybe it is - judge for yourself): Fortran is _inherently_ more efficient for numerical/scientific work than C is. The C parameter passing mechanism implicitly coerces all arrays to pointers - which degrades the efficiency of the procedure being called. From article <11029@chaph.usc.edu>, by ajayshah@aludra.usc.edu (Ajay Shah): > [...] > Honestly, I can't imagine why Fortran is half as popular as it > is. All old libraries can be linked into Pascal/C programs these > days, which removes the only "fundamental" reason to hang on with > fortran. Pascal is a _much_ better language than C. I don't know why you mention them in the same context. In most respects, Pascal is on the opposite end of the language spectrum from C - Fortran would actually lie _between_ them in most respects. They _are_ similar in that neither on provides adequate support for array computations. > [...] no checking for number/type of arguments to > functons/subroutines, This is not a feature of Fortran - it is a feature of many implementations of Fortran. It is also a feature of all the C implementations I've ever seen. It is _not_ a valid complaint in this context. > [...] not to mention the > silly syntactic irritations. C has _many_more_ of these than Fortran does. Starting with expression valued assignment, control structures with begin-end (though C spells them as '{' and '}'), case-sensitive names, comments that wrap off the end of lines, statements that wrap off the end of lines, lack of a logical data type (which is a syntactic irritant because it causes C to require two complete sets of boolean operators), etc.. Note that I've only mentioned those problems which are _known_ from psychological and error survey studies to be detrimental to programmer productivity. A whole crowd of additional features (which are almost certainly bad but haven't been tested): over 40 operators, 15 levels of precedence, _really_ peculiar declaration syntax (I'm told that it looks this way so that the declaration will look like a use - but see what follows), _really_ peculiar syntax for using complex data items, etc.. This brings us to the _real_ reason that Fortran users don't switch to C - C is _NOT_ an improvement!! Fortran has a number of deficiencies, _some_ (very few) of which are corrected in C. But C introduces other deficiencies - worse than the ones it corrects. Quite rationally, Fortran users are waiting for a _BETTER_ language to show up before they switch. Fortran 90 had a chance to be this better language - but they blew it with a brain-dead pointer proposal (among other problems). J. Giles