Fortran vs Python - Newbie Question

Andy Dingley dingbat at codesmiths.com
Mon Mar 26 16:11:26 CEST 2007


On 26 Mar, 14:20, "Noma... at gmail.com" <Noma... at gmail.com> wrote:

> what are the advantages of using Python for
> creating number crunching apps over Fortran??

If you have to ask, you've not experienced enough Fortran to know its
sheer horror.

You can write programs in Python that do usefully complicated things,
and you can get them to work in a reasonable time. Fortran can't do
this, for anything more than the trivial. "Classic" Fortran tasks of
the past are now seen as trivial. OK, so they did it to a lot of data,
but they really didn't do anything very complex to it.

You can also write Python that other people can read and maintain. You
can't do this in Fortran, without a truly insane amount of trouble. As
Fortran programs have historically been authored and hacked on by
successive generations of grad students, this is the most vital
feature of all.

Finally we're no longer so interested in "number crunching". Number
crunching used to consist of simple operations over vast arrays of
data, although this was data with remarkably simple structure by
today's standards. These just aren't the major class of problems of
interest today. There's a massive difference between old-school FEA
(bashing Newton and Hooke into tinier and tinier cells) and
bioinformatics or anything involving the representation of big data
graphs.

> Python is a tad slower than Fortran

If the Fortran program turns out to have been broken all along, then
who cares?




More information about the Python-list mailing list