New to Python: Features

beliavsky at beliavsky at
Sat Oct 30 03:39:04 CEST 2004

aleaxit at (Alex Martelli) wrote in message news:<1gme4mk.1rlz70v1cswu9zN%aleaxit at>...
> <beliavsky at> wrote:
> > aleaxit at (Alex Martelli) wrote in message
>  news:<1gl6fnk.m1zq7z1fm0nhbN%aleaxit at>...
> >  
> > > > No, no, I want the C speed.
> > > 
> > > Then use C: no other portable language (including C++ when properly
> > > used) quite matches C's speed across the board.
> > 
> > I doubt this assertion -- Fortran is portable and is easier to
> > optimize than C, in part because pointers are used less.
> For numeric computing, yes.  "Across the board", no.  I've done almost
> as much Fortran as C in my life... but while it was fully appropriate
> back when I was in IBM Research doing (what at the time was called)
> "supercomputing", when I moved to a small SW house doing CAD for
> mechanical engineering, I soon determined that Fortran's limitations
> were costing us a lot in both development time and runtime efficiency.

Were you using Fortran 77? Most of this version's limitations (rigid
source form, no abstract data types, no dynamic memory allocation, no
compile-time checking of procedure calls) were fixed in Fortran 90.

> > Fortran 95 and Python with Numeric or Numarray are comparably high
> > level languages, but Fortran has a performance edge of 2-100 in the
> I disagree on the level -- Numeric reminds me much more of APL, which
> was regularly used for exploratory numeric computing in IBM Research,
> before the most promising approaches, needing to run on frightening
> amounts of data, got recoded in Fortran (contradicting your assertion
> that "good programmers don't want to recode": if they're good, they
> _are_ in fact quite willing to, if and when top performance is needed in
> some computational kernel).

Fortran 90 and later versions have array operations, including array
sections, similar to Matlab or Python with Numeric or Numarray. Are
you familiar with the array functionality of F90/95? If so, what
important functionality do you find lacking, compared to Numeric or


> > There is even a free, fast compiler called G95 for these
> > platforms -- see .
> Are you claiming this is _MATURE_ while pyrex isn't?  Literally
> speaking, you are, since you earlier stated, baldly and without any
> qualification, that "Fortran 95 compilers are mature", and here you
> appear to be implying that G95 is a Fortran 95 compiler -- so, the
> sillogism is compelling.

The mature Fortran compilers I was thinking of are commercial products
from Intel, Lahey, Absoft, NAG, and other vendors, with links at
. G95 is still under development, but it does compile a wide range of
production codes, some listed at .

My general argument is that Python advocates are attacking a straw man
when they talk as if the main alternative to a high-level modern
language like Python is good old C. If they compare Python with C++
with OOP and STL for general-purpose programming, or with Fortran 95
for scientific computing, some of the "high-level" advantage of Python

More information about the Python-list mailing list