[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: just how bad is Fortran?



Sorry, I can't resist either!  <grin>  (BTW, the following are just my
personal opinion, and I hope I'm not starting a language war.  :)
And the following might be off-topic.  (sorry!)

On Tue, 22 Jul 1997, Adriano Nagelschmidt Rodrigues wrote:

> Sorry, I can't resist ;-)
> 
> fortran (77) is horrible. Well, it _was_ ok, Backus was a pioneer, etc. But we
> are in the end of the '90s (and I thought only *my* profs were forcing
> students to use it!)
> 
> You will be much better writing your code in ANSI C (pointers aren't difficult
> once you get to know them).

I don't know much about Fortran, and only basic C, but from what I've
read, while C is a wonderful language, there are also many pitfalls, and
in some ways this make things really ugly and dangerous, especially when
someone mess up the pointers, etc.  It is not type safe, and it puts a lot
of burden on the programmer to be careful and exercise discipline to avoid
errors.  I said that because I have tried to debug some really obscure
bugs in a relatively large C program written by previous students (Borland
C++ 4.5), and it took me a really long time to do so.  It was partly due
to bugs in Borland's C compiler, but some "features" in the C language
didn't help either.

This is where languages like Pascal, Modula-2, Modula-3 Oberon-2 come in. 
In perspective, they have much cleaner syntax than C, and they enforce
strict type checking and other safety features which prevent someone from
"shooting oneself in the foot".  (Is that the right expression?  ^_^)
Also, I have read messages from people who program in Modula-2 (etc.)
claiming that they spend much less time debugging thanks to the clean
and safe design of the language.  I think there are some truths to their
claim.

So, in some ways, comparing C and Fortran 77, Fortran might not be so bad
after all.  At least, my former employer/supervisor really likes it and
uses it often to do engineering calculations.  The C program (a coal
proocessing graphing software) that we were working on?  It gave all of us
students and our supervisors big headaches due to the obscure bugs and
mysterious crashing that took us a long time to find and fix.

To be fair, the program had been worked on separately by many student, and
not all of us practised good programming style.  However, my opinion is,
while C is a great language for many tasks, it requires great discipline
(and a lot of time) on the part of the programmer to keep the code clean.
It is not the best candidate for every task.  ^_^

Anthony

-- 
Anthony Fok Tung-Ling            foka@gpu.srv.ualberta.ca
Civil Engineering                http://www.ualberta.ca/~foka/
University of Alberta, Canada    Keep smiling!  *^_^*


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: