Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!ames!haven!uvaarpa!murdoch!astsun7.astro.Virginia.EDU!gl8f From: gl8f@astsun7.astro.Virginia.EDU (Greg Lindahl) Newsgroups: comp.lang.fortran Subject: Re: Fortran -vs- C (yet again) Message-ID: <1990Nov28.030805.6753@murdoch.acc.Virginia.EDU> Date: 28 Nov 90 03:08:05 GMT References: <1990Nov24.002836.19739@ariel.unm.edu> Sender: news@murdoch.acc.Virginia.EDU Organization: Department of Astronomy, University of Virginia Lines: 32 In article <1990Nov24.002836.19739@ariel.unm.edu> john@ghostwheel.unm.edu (John Prentice) writes: >Concerning the on-going Fortran vs C discussion, let's turn the >problem around. Instead of C programmers defending C against >Fortran, I would be curious to hear a discussion of what C has >that is so lacking in Fortan, from the perspective >of the scientific programmer, not the computer scientist. Well, many Fortran programmers also know C, and some of us are fluent in quite a few languages. It's more a matter of picking the right tool for the right job than an argument between diametrically-opposed camps. My latest scientific coding project was a numerical hydrodynamics code. It has no need for data structures other than simple arrays. It has no need for dynamic allocation. It does need to be able to be compiled on a bunch of different scalar and vector architectures and run fast. So I chose Fortran. I would like to see structures in Fortran. I would like to see more compilers check subroutine/function argument types. But I don't want to see Fortran messed up such that I have to code register temporaries by hand for array elements that are used more than once in a loop. At the moment, that's what I think I'd need to get C to run as fast for some of my numerical stuff. So add structures but try to prevent people from using pointers too often. And that's what the F9x people tried to do. >To be honest however, the whole debate seems a bit sterile. Use whatever >language you want, they just aren't that different. Yup. But if you have a target machine in mind, or target machines, you should consider the relative quality of the compilers too.