scripting languages vs statically compiled ones

Peter Hansen peter at engcorp.com
Sat Oct 30 09:03:21 EDT 2004


Richard Blackwood wrote:
> Cameron Laird wrote:
>> Like many propositions in this thread, this one bears repetition
>> and examination.  Even people in authority reiterate that "Java
>> is compiled, while Python is interpreted."
> 
> So now Java is compiled eh?  I suppose that is more accurate but I 
> prefer to say that Java is bytecode compilable whereas Python is 
> bytecode interpreted.  So with a broad stroke, I would say I am inline 
> with those in "authority", though I tend to be more specific.

Not that it's directly relevant to this thread, but what value
does your greater specificity provide in the case of a CPU
that directly implements the Java "bytecode" as its native
instruction set, Richard?

Java has a much lower level bytecode than Python's, but
even using the term "bytecode compilable" versus "bytecode
interpreted" could be considered misleading.  If you study
the mechanisms involved in going from source to execution
in each language, they are very very similar, to the point
that saying one is "compilable" while the other is "interpreted"
is basically inaccurate.  *Both* are compiled to bytecode,
both have a runtime interpreter which executes that bytecode,
but so far only Java has true compilers that can skip the
bytecode step (or perhaps they use it as the input, I've
never bothered to learn) and generate native machine code,
which is effectively what the JIT compilers do for Java
(and what Psyco does for Python, albeit in a much more
limited fashion).

-Peter



More information about the Python-list mailing list