Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!bu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!corton!mirsa!zig.inria.fr!kjartan From: kjartan@zig.inria.fr (Kjartan Emilson) Newsgroups: comp.lang.fortran Subject: Re: Fortran vs. C for numerical work Message-ID: <9282@mirsa.inria.fr> Date: 26 Nov 90 14:23:19 GMT References: <21884@orstcs.CS.ORST.EDU> <531@taumet.com> Sender: news@mirsa.inria.fr Reply-To: kjartan@zig.inria.fr (Kjartan Emilson) Organization: INRIA, Sophia-Antipolis (Fr) Lines: 76 Nntp-Posting-Host: zig.inria.fr This discussion seems to pop-up once in a while regurlarly on this group. The reason seems to be that some people in science are suddenly confronted with the reality of the workstations, based mainly on UNIX, and as such, heavily biased towards the C language. They ask: What is this ! I have programmed in fortran, just like my professor did, just like his/her professor did, etc. etc.. Why should I switch to another language ? Then there are other people, whith a more technical background, who come up with the following arguments: 1. Fortran has been around longer than C, so fortran compilers are more efficient. 2. Most of scientific libraries going around are in fortran. I am working in an institute which main research works are dynamical systems, both from a mathematical point of view as from the point of view of physics. The systems studied are mostly derived from fluid dynamics, and as such are very numerically expensive systems. Graduate students here get an extensive formation in computational techniques, and recently we decided to convert totally to the use of the C and the C++ language as our main programming languages. Our reasons for this are the following: 1. Computers are getting more and more powerful, and the importance of speed is decreasing, i.e today on a SUN Sparcstation or an IBM Risc 6000 you can get computational power, that some years ago was only available, on larger mainframes, using batch. This idea of batch job, compared to interaction on a workstation, is very important, when we say that the importance of speed is decreasing. When you run a job in batch on a CRAY 2 computer, you will get your result in a time scale ranging from a few hours to a few days, even though the actual job only takes a few minutes in running. If instead you write a program which runs *interactively* on a workstation on your desktop, you actually see what is happening and you can change the parameters of the system accordingly, immediatly. 2. Another reason is the concept of abstraction. A language such as C++ (and C if you are careful) offers the possibility of creating more abstract data types and operation, which are more adapted to the theory in which you work. This makes a bridge between the theorists and the pure and hard numerics. There was a time, when there was a clear distinction between those who formulated the problems and those who actually implemented them on the computers. This distinction is very bad, and can lead to many kinds of frictions. With the evolution of computer science, the aim should be, that anybody who wants to use the power of a computer to solve a problem should be able to do it without being an expert in the byte ordering of a given machine, or god knows what. The cursus we offer to our gradutate students is the following: 1. Study of the C language 2. Study of X11, Xt and Athena widgets environment 3. Study of some object oriented language, such as C++ Some people did not believe that it was possible to teach pure and hard physicists these programming language, but the result is quite the opposite! and more than that the enjoy it... In short: Fortran was a language designed to make calculations in batch on some large mainframe, and is not adapted to be on your desktop. The C language was not actually designed either to be on your desktop, but the evolution has been that it is there, and that it works well with UNIX, and works well with X11, the standard in networked graphics and interactive applications. Computers are changing, and languages must change also. -Kjartan ------------------------------------------------------------------ Kjartan Pierre Emilsson Institut Non-lineaire de Nice-Sophia Antipolis Parc Valrose Nice France e-mail: kjartan@zig.inria.fr