Fortran vs Python - Newbie Question

Cameron Laird claird at lairds.us
Mon Mar 26 17:07:17 CEST 2007


In article <mailman.5628.1174916538.32031.python-list at python.org>,
Jean-Paul Calderone  <exarkun at divmod.com> wrote:
>On 26 Mar 2007 06:20:32 -0700, "Nomad.C at gmail.com" <nomad.c at gmail.com> wrote:
>>OK...
>>I've been told that Both Fortran and Python are easy to read, and are
>
>Python is hugely easier to read.
>
>>quite useful in creating scientific apps for the number crunching, but
>>then Python is a tad slower than Fortran because of its a high level
>
>Fortran is massively faster than Python.
>
>>language nature, so what are the advantages of using Python for
>>creating number crunching apps over Fortran??
>
>You can get the speed of fortran in Python by using libraries like
>Numeric without losing the readability of Python.
>
>Jean-Paul

Me, too.  A lot of language questions are correctly
answered, "Indistinguishable, to within the range
of subjective response."  This is NOT the case for
the readability and performance of Fortran and Python,
though; the differences are as massive as Jean-Paul
says.

HOWEVER, that's all true only in general.  As a new-
comer to both Fortran and Python, there's a fair
chance that the Fortran code you first produce would
be so suboptimal as to perform no better than the
corresponding Python.

My vote, therefore, is this:  unless you're in an
organization that provides a lot of Fortran support
to such beginners as yourself, choose Python.  It 
has all the pertinent advantages.

We can discuss secondary concerns at more length, 
if you wish:  Python's better suited than Fortran
for a range of other applications you might wish to
tackle some day; Python originated from a language-
for-beginners project, and truly is something you
can start to pick up in a day; your own scientific
specialty might be one that's particularly well-
endowed with an existing body of code written in
Fortran (or Python, or C++, or ...); and so on.



More information about the Python-list mailing list