home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / c / 16435 < prev    next >
Encoding:
Text File  |  1992-11-12  |  3.6 KB  |  76 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!concert!uvaarpa!darwin.sura.net!convex!constellation!iapa!ctrbdo
  3. From: ctrbdo@iapa.uucp%mailhost.ecn.uoknor.edu (bryan d oakley)
  4. Subject: Re: Reasons for using C vs. Fortran or vice/versa
  5. In-Reply-To: djulian@controls.ccd.harris.com's message of Thu, 12 Nov 1992 13:59:01 GM
  6. Message-ID: <BxMKrt.JBo@iapa.uucp%mailhost.ecn.uoknor.edu>
  7. Organization: FAA / Mike Monroney Aeronautical Center
  8. References: <1992Nov12.135901.15191@ccd.harris.com>
  9. Distribution: usa
  10. Date: Thu, 12 Nov 1992 22:50:15 GMT
  11. Lines: 63
  12.  
  13. > This may or may not be the place to ask this, but here I go anyway.
  14. > I was wondering what advantages Fortran has over C(if any) and
  15. > vice-versa.
  16. >
  17. > I know C is much better than Fortran in the I/O dept., but is there
  18. > anything else that makes it a better language.
  19. >
  20. > The reason I ask is when was in college, we used C for our primary
  21. > language.  But the company I work for, uses a lot of Fortran(mainly
  22. > because it was written years ago and still works).  We do a lot of
  23. > number crunching around here and I've always been told that Fortran
  24. > was very good at that.
  25. >
  26. > Is Fortran actually better than C for number crunching routines?
  27.  
  28. Let the holy wars begin!  Off the top of my head (and boy does that
  29. hurt :-) I say that FORTRAN has the advantage that there are millions
  30. of lines of it laying around all over the place.  It's (arguably) easy
  31. to use and yes, it's good at number crunching.  
  32.  
  33. Each language has qualities that make it better than all other
  34. languages for certain tasks.  For FORTRAN, numerical processing seems
  35. to be a forte, I/O a liability.  The problem with C, IMHO, is that in
  36. the hands of the uneducated programmer (or poorly educated programmer,
  37. for which there are legions) is a very dangerous weapon.  As for
  38. having to maintain code, I have seen many, MANY more lines of hard to
  39. fathom C code than FORTRAN code, but then I've seem some very
  40. difficult algorithms coded in a most elegant way in C.  FORTRAN
  41. requires a bit more brute force.  And true, FORTRAN GOTO's are
  42. notorius for making code unreadable.  But then, that's another story
  43. altogether.  Anyone who uses GOTO's with any regularity gets what
  44. he/she has coming.
  45.  
  46. Language choice depends on the task to be solved.  Where I work, we
  47. support 150,000+ lines of good ol' FORTRAN, but if I have to write a
  48. little program to process text or do windows or whatever I use C.  I
  49. actually consider myself to be a FORTRAN programmer at heart and can
  50. write very elegant (ahem :-) stuff with it.  I recently had a
  51. discussion with some co-workers on what language we would rewrite our
  52. software in, given the chance.  I ended up thinking that staying with
  53. FORTRAN isn't such a bad idea.  The suitability of any language is
  54. dependent on the task at hand.
  55.  
  56. I know this is comp.lang.c, but posting about FORTRAN in
  57. comp.lang.fortran is like preaching to the choir.  For what it's
  58. worth, here are three quotes taken from the net in the past couple of
  59. days:
  60.  
  61. "I don't know what the computer language of the year 2000 will look
  62.  like, but I know that it will be called FORTRAN. (Tony Hoare?)"
  63.  
  64. "FORTRAN was FORTRAN when C was a pup,
  65.  FORTRAN will be FORTRAN when C's time is up. (Seymour Cray?)"
  66.  
  67. "Fortran was a mistake of innocence and naivete.  C was created by people
  68.  that should have known better." (anon)
  69.  
  70. -- 
  71. ----------------------------------------------------------------------
  72. Instrument Approach Procedures Automation              DOT/FAA/AMI-230
  73. ----------------------------------------------------------------------
  74. Bryan D. Oakley                    ctrbdo%iapa@mailhost.ecn.uoknor.edu
  75.