Worth learning fortran?
Hi
I am currently doing my fourth year at mathematical physics (at KTH Stockholm). I am going to take a course in computational physics, and we are free to choose between C and Fortran. I have been told that Fortran is superior for mathematical programing but I also realize C is more of a standard language. The catch is that I'm not planing to do a phd, but rather to go out and work with something engineering-like.
So I'm wondering what Fortran is actually capable of and how useful it would be to me. All my friends tell me to stick to C/C++ like them but since I am far more of a mathematician/physicist than a programmer I can imagine working with very mathematical assignments.
What is your opinion on these to languages from a career point of view? I should add that I currently only know a limited amount of java and a little python.
Best regards, Carlis



Fortran vs C
Hi Carlis,
I regularly program in C-based languages (eg Mental Case) and Fortran (eg ADF). They each have strengths and weaknesses.
Fortran has two strengths: it is used in many legacy programs in certain fields (eg computational chemistry); and, it has the best array support of any language that I know of.
C's greatest strength is ubiquity. Nearly everything is based on C these days, even other languages like C# and Java.
You really need to decide whether Fortran will be widely used in the field you plan to build your career in. If so, it could be worth learning. If not, it is not worth learning. If you're not sure, you should probably go with C — it's a safe bet.
Another thing you should know: it won't matter too much which you learn. Each language has similar constructs, and learning one after you are familiar with the other will be relatively easy. So don't think your life is hanging on the decision.
Good luck.
Regards,
Drew
---------------------------
Drew McCormack
http://www.maccoremac.com
http://www.macanics.net
http://www.macresearch.org
C\C++ seems more promising choice !...
Hi
Back in college(engineering), I learned Fortran, later jumped on Pascal. Last 10 years, I have been using C\C++. Fortran has some strengths in some areas, but there is always an answer in C\C++ community. If you are not going to deal with any legacy code written in Fortran and if you just start learning a programming language right from the beginning, I suggest you go with C\C++. It seems there exits more opportunities with C\C++ and also more fun.
bulent
Thank you for the advice.
Thank you for the advice. You are probably right, It's a safer bet to go with c++. I think I'm going to focus on C++ but get fortran and play around with it a little.
I understand xcode 3.0 has a c++ compiler by default, what about fortran? Is there an open source/free option at the moment?
I haven't used xcode much and for java I found it rather frustrating. Right now I use netbeans for my java. Is xcode a good environment
for c++? How do you use fortran on mac, is it via xcode plugin? I saw that some guy won an ipod by creating a plug in but I got the impression that it was not compatible with xcode 3.0 and leopard.
Best regards, Carlis
Xcode for Fortran and C++
Xcode works great out of the box with C++, in my experience.
Fortran is not directly supported. You need to install a compiler (eg from hpc.sourceforge.net). You also need to figure out how you will do projects. We used to have a plugin for Xcode on MR, but I believe it is not supported on Leopard. On leopard there is something in Xcode called the Organizer, which can be used for Fortran projects.
Drew
---------------------------
Drew McCormack
http://www.maccoremac.com
http://www.macanics.net
http://www.macresearch.org
I'd go with Fortran
As previous posters have pointed out, both languages have their strengths and weaknesses. However, I'd say you'll get innumerable other chances to learn C if you need a classroom-type setting to learn C, so might as well take this class in Fortran, as there won't be *that* many chances where you're going to be taught something in that language.
I know both languages, and lay down Fortran 95 files if I start up a new project for "heavy lifting" work with numbers. In the fields that have been working with computers since the dawn of the darn things, most of the culture is in Fortran (such as the climate modeling I work on for my day job). However, as others have said, C is a standard. You can't turn around without getting hit in the face with it. But the thing is that it's everywhere, so if you don't learn it now, you can learn it later.
Learning Fortran vs C
As a guy who learned Fortran using card decks, I think it is perhaps a bit past its peak. The new ones, like F95 are pretty up to date, but just don't attract large development communities. It is safe to say that everyone should know basic C, though.
I would recommend that you discuss GNU Octave (which implements a large fraction of Matlab) with your instructors. It is a Fortran family language but it has a some array processing extensions and gobs of linear algebra and statistics libraries. It seems to me to be the logical successor of Fortran because it handles numerical computing very well, has built in complex numbers, good access to the file system, easy access to command line arguments, and really slick plot package interfaces all built into the language. Octave runs on Mac, Linux, and Windows so you can go anywhere with it. I think the Linux version is the most advanced (it supports sound), but I use it on my Macs and find it to be pretty comprehensive. Faster to write than Fortran, and WAY faster to write than C. Matlab/Octave is a better resume builder, than Fortran these days. You can get it to compile now days, too.
Best of luck.