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