language interpreters/ interpreted languages weaknesses?

Martijn Faassen m.faassen at vet.uu.nl
Thu Sep 2 06:33:53 EDT 1999


Phil Wise <philwise at geocities.com> wrote:
> On 1 Sep 1999 15:30:16 GMT, m.faassen at vet.uu.nl (Martijn
> Faassen) Anounced to the internet:

> :->I think Java can compete in popularity with Perl. And Java's (usually)
> :->interpreted.

> This is a bit missleading, since although Java _is_
> interpreted, it is compiled into java byte code, which is
> not very different to machine code. You could call the Java
> VM an emulator for a never created computer, then Java would
> count as compiled.

Well, if you had a Python computer that executed Python instructions
in the hardware, then Python would count as compiled. I know the Python
bytecodes are higher level than Java's, though. My definition of 'interpreted'
would be something like this:

The program is parsed/compiled into an intermediary non-machine language
format which is executed (such as bytecode, parse trees, etc).

Compiled would be:

The program is compiled to native machine language, which is
then executed.

> Java also is very unlike any other interpreted language
> because it has real typing and none (few) of the performance
> issues that are associated with other interpreted languages.

I thought Java code still was slower than C++ code at the moment. I know
the gap's decreasing rapidly, but that doesn't make Java-on-the-JVM any less
interpreted. I know it's fast enough for most purposes, but so is
Python. :) Aren't there other interpreted languages out there that have
static type checking? (which is a better description than 'real typing';
Python has real types too :)

> Java has a just in time compiler, I don't know if other
> scripting languages do, (a JIT for python would be
> interesting)

Yes, as soon as you go into just in time compilers and plain native
Java compilers, Java isn't interpreted fully anymore. And because of
Java's static type checking it can be compiled far more easily than
for instance Python.

Java, until Java native compilers are more common, is an interpreted
language that just happens to look a lot like a compiled one. Not that
there's anything _wrong_ with interpreted.

Regards,

Martijn






More information about the Python-list mailing list