language interpreters/ interpreted languages weaknesses?

Stephan Houben stephan at pcrm.win.tue.nl
Thu Sep 2 08:15:19 EDT 1999


m.faassen at vet.uu.nl (Martijn Faassen) writes:

> William Tanksley <wtanksle at dolphin.openprojects.net> wrote:
> [snip]
> > Java's not interpreted, though -- I've never seen ANY Java interpreter.
> > Java is always compiled, usually to bytecode, and then the bytecode
> > machine is emulated.
> 
> Um, I was under the impression that this is what a modern interpreter
> actually does? Parse the source to bytecode and execute the bytecode.
> After all, Python does the same, right?

Yes, that was my impression, too.
Python uses bytecode, Perl uses bytecode, many Scheme implementations
use bytecode. Objective CaML uses bytecode or native code. Emacs Lisp
can use bytecode.

Even TCL uses bytecode nowadays.

Moreover, if you read a more-or-less theoretical book on language
implementation (as I once had, very interesting BTW), you will find out that 
even those "toy languages" are compiled to something like G-code or TIM-code.

So AFAIK byte code compilation is just how things are "supposed" to be done.
Then, if you have someone with enough free time, you might want to try
a native-code generator.

Of course, Sun marketed the fact that Java used bytecode as if it was
something revolutionary. "No, it is not interpreted, it is compiled to
Byte Code!" Of course, all those other languages which had been called
"interpreted" where actually compiled to byte code since the
beginning of time. Byte-code compilation is really as old as the Sun. ;-)

So now, Java people insist that their language is "compiled".
Even when the supposedly "interpreted" languages like Python do
exactly the same, and did it before Java even existed.

OK, this is probably preaching to the choir. So now I will modify
my lambda-expr interpreter to a bytecode implementation. ;-)

Greetings,

Stephan




More information about the Python-list mailing list