Is FORTRAN Still Kicking?
Algorithm wrangler queries: "I'm beginning to wonder if I should invest the time in learning FORTRAN. Although it is, arcane it seems to be the best tool when it comes to demanding optimization tasks and heavy computations. C/C++ does not cut it for me - it is simply too easy to make mistakes and I find myself using half of my time hunting bugs unrelated to the problem at hand. Additionally, although tools like Matlab exist they don't provide the power that justify the huge price tag they carry. I find any script based language (Matlab, Numeric Python, Scilab) to be inadequate as soon as it is necessary to use loops to describe a problem and using such tools for recursive systems can be a real pain. As another data-point, the Netlib repository seems to be very FORTRAN oriented, and it is a true gold mine when it comes to free routines for solving almost any computing task. What bothers me though is that FORTRAN code is really ugly and the language lacks almost any modern day language feature (I know about Fortran 90 but it is not much nicer than F77, and no one seems to use it). Can it really be true that the best tool we have for heavy duty computing is a 25 year old language, or have you found anything better - free or non-free?"
Not true when compared against modern C++ (and its compilers). C's libraries may not be (and may never be due to compiler pointer aliasing issues), but C++'s are. One in particular is Blitz++.
Not to take away from Fortran. Language in general means far less to performance than an experienced programmer and good algorithms. A good compiler helps too. After that, it's all ones and zeros -- not a language that most humans can understand.
- I don't need to go outside, my CRT tan'll do me just fine.
"It is not because of c pointer aliasing issues, it is because nothing in c was allowed to be inline, this is all mute with C99."
Umn, that would be 'moot', methinks.
A.
...bringing you cynical quips since 1998
You've got to be kidding - IDL is one of the worst things I've laid my eyes on.
I'm a physicist, and I had the displeasure of teaching poor first-year students IDL. It's beyond me why the course-planners decided on IDL - it teaches the students all the bad habits they shouldn't learn until after some 10+ years of programming in C :-)
Actually I know why the course planners chose IDL: they are astronomers, and as all real physicst knows, astronomers are a bit weird :-)
Again (yes I did another post on this topic), I'd like to direct your attention to ROOT, which has scripting and API capabilities. IDL lacks the latter, unless you pay $$$ to the IDL company to get them to write a module for you - heck making a n executable that uses IDL is a plain pain in the behind.
In essence - stay as far away from IDL as you possibly can. Use something you can extend and play with, and which has a decent executable speed.