Python compared toJava

Jp Calderone exarkun at intarweb.us
Thu Apr 10 17:58:29 EDT 2003


On Thu, Apr 10, 2003 at 10:24:28AM -0700, Geoff Gerrietts wrote:
> Quoting Blaktyger (blaktyger at hotmail.com):
> > Hi!
> > 
> > I recently read that the Python interpreter is like the Java Virtual Machine.
> > Is that true?
> 
> It's hard to tell exactly what you mean by this, but since you seem to
> have received an unusually high proportion of flip or catty responses,
> I'll try to reply.
> 
> A Java program runs inside the context of the JVM. A Python program
> runs inside the context of the Python interpreter. In this way they
> are similar: the actual process observed in the operating system's
> process table will be the JVM or interpreter, not the program itself.

  Runtime context is a property of exactly that - the runtime.  You're
describing CPython, it seems, which, while the canonical Python runtime, is
not the only Python runtime (given reasonable bounds for what one considers
"Python").  See Jython, for example, where the answered to the OP's question
would be "No, it is not *like* the Java Virtual Machine, it *is* the Java
Virtual Machine".  Consider also a future in which a smart person has
written a native compiler.

  The language can remain the same while the runtime environment changes. 
Don't confuse properties of one with properties of the other.

> [snip - more good information about CPython]

  Jp

-- 
Examinations are formidable even to the best prepared, for
even the greatest fool may ask more the the wisest man can answer.
                -- C.C. Colton
-- 
 up 21 days, 17:01, 8 users, load average: 2.05, 2.10, 2.07





More information about the Python-list mailing list