[OT] Compilable Python-like language?

beliavsky at aol.com beliavsky at aol.com
Sun Mar 21 18:52:53 EST 2004


Ed Cogburn <edcogburn at hotpop.com> wrote in message news:<mailman.183.1079791608.742.python-list at python.org>...
> I'm just curious if such a beast exists out there.  I've googled around some 
> and read some programming language websites but I have yet to find a language 
> similar to Python that can be compiled to binary.  Have I been looking in the 
> wrong places?  I certainly can't be the only person to want a Pythonish 
> language that can be compiled.  Even a language that just uses Python's basic 
> syntax characteristics (no end-of-statement markers, use indentation to denote 
> code blocks, less verbose syntax overall, etc) 

<SNIP>

Especially if you are using Python for numerical work, in which case
you are probably using the array modules Numeric or Numarray, I would
recommend Fortran 95. Like Python, it does not have end-of-statement
markers or use curly braces to delimit blocks of code. Code blocks are
ended with explicit statements, not indentation, a difference from
Python, but Fortran code is often indented in a way similar to Python.
Fortran 95 is not as concise as Python, but in return I would say it
is more self-documenting.

To get started with Fortran 95, you could try F, a subset compiler
that is available for free on Linux and Windows -- see
http://www.fortran.com/F/compilers.html. A project create a free
Fortran 95 compiler using GCC is well underway -- see
http://gcc.gnu.org/fortran/. FWIW, many Fortran 95 programmers'
favorite scripting language is Python.

In my experience, numerical Fortran code is often more than an order
of magnitude faster than the Python equivalent.



More information about the Python-list mailing list