Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!hpcc05!hpcuhb!hpcllla!hpcllmv!jbc From: jbc@hpcllmv.HP.COM (Jeff Caldwell) Newsgroups: comp.lang.fortran Subject: Re: Fortran -vs- C (yet again) Message-ID: <1270009@hpcllmv.HP.COM> Date: 24 Nov 90 10:07:49 GMT References: <1990Nov24.002836.19739@ariel.unm.edu> Organization: Hewlett Packard Calif. Language Lab Lines: 30 >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. Hmm... I can't really argue for the merits of C when you're limiting the conversation to scientific programming. I wouldn't really want to use C to create a heavy duty large number crunching application. Fortran would likely be better. I work at Hewlett Packard and currently write/maintain/enhance both the Fortran and C compilers for 4 different platforms (different machine types). I feel C is a much better language for sophisticated datatype/structure manipulation. It's ease of use of pointers and structures is unmatched by even the most robust implementations of Fortran. Fortran, on the other hand, allows you to do terribly perverse things to memory with the use of COMMON blocks and EQUIVALENCEs. You can't even begin to do some of the data overlapping and data disection in C that Fortran enables you to do. The defined support for COMPLEX datatypes is a good example of why Fortran is far superior for numerical applications. Of course, I haven't mentioned anything that is news to anyone. I guess the fact that I wouldn't want to write anything larger that a couple of hundred lines in Fortran but don't mind writing large applications in C says something for C. Jeff Caldwell | HP California Language Lab P.S. Both the Fortran and C compilers are written in C :-)