Article View: sci.math.num-analysis
Article #365Re: The importance of high-performance computing
From: Ronald Schoenberg
Date: Fri, 28 Aug 1992 00:49
Date: Fri, 28 Aug 1992 00:49
41 lines
3037 bytes
3037 bytes
In article <1992Aug27.152740.29641@alchemy.chem.utoronto.ca> mroussel@alchemy.chem.utoronto.ca (Marc Roussel) writes: >In article <l9p02vINNorv@almaak.usc.edu> ajayshah@almaak.usc.edu (Ajay Shah) >writes: [....] > with C's awful syntactic conventions. (To quote Carlin: > "These are my rules, I make them up!" More seriously, C > and C++ violate criterion (1). For example, I learned Fortran > by writing a library which performs certain quantum chemical > calculations. As far as I know, this library is still in use. > I doubt that I could have undertaken such a project in C and > completed it in the alloted time without at least some prior > experience with the language.) > > 3) You can convert Fortran code to C code, but if you want to > have any chance of maintaining it, you had better hold on to > the Fortran code. The old libraries and programs are still > useful and we can't just throw them away. > It is a mistake to compare C++ to C. With a set of good matrix class libraries, and some experience with array languages, you can begin programming immediately in C++, not to mention with many times the productivity of FORTRAN. C++ is all about interface. Let a specialist design the classes (i.e., the interface) and the scientist/engineer can go from there. And I don't throw away my Fortran - I write C++ wrappers for them. That way I can merrily factorize and decompose without having to keep track of all those Fortran subroutine arguments (because the C++ objects take care of all that), and I don't have to mess with those cryptic function names (because I can overload function names and the C++ object knows what to do). And if I do want to get into object-oriented programming I can design my own classes, for example, I could design a new data type that suited my problem. With a templated matrix class all I would have to do is provide functions for computing the operations of a new data type, for example, +, -, *, and /, for interval numbers, and I would instantly have an array language with interval numbers. In fact with not much trouble I could declare a multi-dimensional array of double precision rational complex interval numbers (if that was what I wanted). I think it is a huge mistake to try to do numeric programming in C, but such a judgment doesn't generalize to C++.
Technical Details
Message-ID:
<1992Aug28.004926.4194@u.washington.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!hardy.u.washington.edu!ronsReferences:
<l9p02vINNorv@almaak.usc.edu> <1992Aug27.152740.29641@alchemy.chem.utoronto.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!usenet.coe.montana.edu!news.u.washington.edu!hardy.u.washington.edu!rons From: rons@hardy.u.washington.edu (Ronald Schoenberg) Newsgroups: sci.math.num-analysis,comp.lang.fortran Subject: Re: The importance of high-performance computing Message-ID: <1992Aug28.004926.4194@u.washington.edu> Date: 28 Aug 92 00:49:26 GMT References: <l9p02vINNorv@almaak.usc.edu> <1992Aug27.152740.29641@alchemy.chem.utoronto.ca> Sender: news@u.washington.edu (USENET News System) Organization: University of Washington, Seattle Lines: 41