[OT] Compilable Python-like language?
Ed Cogburn
edcogburn at hotpop.com
Tue Mar 23 05:06:31 EST 2004
Jacek Generowicz wrote:
> That rather depends on what you mean by "Python-like".
Oh dear...
It was not my intention to start this kind of debate, because I too have seen
this before. I'm not a troll, I actually consider GvR to be something of a
minor deity. :) To me, Python is the procedural type language that comes
closest to "elegance" IMO. Or maybe its just because I'm lazy and will fall
in love with any lean, terse, yet powerful language that comes along. :)
However, we all know that for some applications/purposes, Python isn't fast
enough. When speed isn't an issue, Python is my solution for now, because
I've not found another language that I like as much. I was merely curious if
any of you may have known about some language currently in development, or
some still-young and little-known language that was like Python and aiming for
something like C/C++-ish performance.
By compile-to-binary, I meant create a binary executable in native machine
code that does not involve an interpreter process (source or byte-code), and
any substantial run-time overhead. In other words my concern, is as always,
about speed.
Concerning Perl/Lisp. I'm using Python because it is *nothing* like those
two. :) Lisp has good performance, and is a compilable language, I'm aware
of that, but I just can't handle all the parentheses. To the individual in
the other thread who said people complaining about all the parentheses in Lisp
are being ludicrous, well, just consider yourself lucky or superior that you
can look at Lisp code for more than 30 minutes without getting a headache. :)
To each their own, I need something else.
Concerning py2exe and freeze. For the former, sorry, I'm a Linux guy, and in
both cases, AIUI, these do not significantly increase performance, they just
bundle the program's byte code, the interpreter, and the library bits the
program uses in one executable file, but there is still an interpreter process
going on.
As for Java, it reminds me too much of C/C++, and my preference is to work
with a language that is open-source and an "open" standard. For essentially
the same reasons, I'm also not interested in C#.
Pyrex is very interesting, I've looked at Pyrex code. The purpose of Pyrex
however isn't to replace Python or the interpreter process, merely to optimize
some parts of a Python program. Even with heavy use of Pyrex, you still can't
get away from the interpreter process, ie., Python will always have to be
there, right?
The language shootout someone posted about was very interesting. By my
"criteria", Lua is the closet to what I'm looking for, unfortunately it seems
to be just a slight variation of Python (byte-compiled-then-interpreted), and
although it scores higher, it does so just barely (virtually identical on
Linux). For me, ocaml is the real surprise, it scores the same as gcc (on the
Linux side, see the link below). Its not Python-like, of course, but I'm
surprised to see any other language score as well as gcc on a *nix system (gcc
being born on *nix, being one of the oldest and most heavily used and
beaten-on languages, as well as being optimized to death).
http://dada.perl.it/shootout/craps2craps.html
More information about the Python-list
mailing list