Alternatives to Fortran
Fortran has served us well as a scientific language; one has only
to think about the fact that it's been around for forty-some years
to realize this is so.
However, there are other alternatives that have several advantages.
- Fortran-77 does not really encourage modern programming styles
or the use of modern data structures.
- Other programming languages allow one to relatively easily
add graphical interfaces and displays, access databases
and integrate pre-packaged subsystems.
- Other programming languages are sought after by potential employers
of our students; not many ask for Fortran experience.
- Most CS departments do not teach Fortran as an introductory
language anymore, so students must teach themselves.
There are many alternative languages. One of the most obvious is C
(or C++). My own personal favorite is
Python, although I don't think it's really suited to
large number-crunching applications.
However, a tenable middle ground is to use C or C++ to write the
number-crunching part, and package it suitably so it can be used
as if it were part of the native Python language.
There is a fairly sophisticated extension of the language
oriented towards numerical computations which does just that;
click here to
go to the numerical extension's home page.
A more interesting link for the person who's never seen Python
is
this one, which is a tutorial on use of the numeric extensions.
You may want to first browse the "normal" Python tutorial which
you can find here.
Fortran 95 offers another route, and it's also a reasonable one.
Fortran 95 does not offer everything Python or C++ does, but it
produces faster-running executables than does Python, and it is
more difficult to hang yourself in Fortran 90 via nasty
"this isn't what you meant to say but unfortunately it's legal"
programming constructs compared to C++. Unfortunately, it's still
rather easy to hang yourself, but this is true of all languages.
Just more true of some than others.
Fortran 95 includes support for modern data structures, and while
object orientation is not yet directly supported, many features
can be
emulated via
existing constructs.
Object orientation (in a limited and safer form than
in C++, similar to that of Oberon-2) will be available in Fortran 2000
(expected to appear in 2002.)
Fortran 95 also has the advantage that it is expressly designed for
scientific computation --- for example, a large set of array
and matrix intrinsics are part of the basic language.
Click here
to read more about what I think about the relative merits of Fortran, C,
C++, and Python.
Jeffrey Templon
Last modified: Tue Jun 23 09:50:43 EDT 1998