home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / sci / math / numanal / 2574 < prev    next >
Encoding:
Internet Message Format  |  1992-08-27  |  3.0 KB

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