Does Python compete with Java?

Roy Smith roy at panix.com
Tue Apr 6 11:29:10 EDT 2004


Chris Herborth <chrish at cryptocard.com> writes:
>> With compiled languages (Java, C#, C++), I find I'm writing a bit of
>> code, taking a break to compile it, figuring out how to unit test the
>> method... Python saves me a huge amount of time in the prototype and
>> development cycles.

Jacek Generowicz <jacek.generowicz at cern.ch> wrote:
> Please note that this has nothing to do with compilation per-se. There
> are languages with to-native-binary compilers which give you all the
> instant turnaround flexibility that Python does.

Even more interesting is the fact that Java and Python both have very 
similar architectures (similar enough, in fact, that things like Jython 
are possible).  Both compile your source code text into an intermediate 
"byte code" form, and both then run this intermediate form on a virtual 
machine.

The difference is that Java exposes the compilation step to the user 
while Python hides it.  If you really wanted to, you could hack up a 
"Python compiler" which takes .py files, imports them to force 
generation of the corresponding .pyc files, and then exits without 
executing anything.  You could then execute the .pyc files in a distinct 
"execute phase".  Not sure why you would want to do that, though :-)



More information about the Python-list mailing list