language interpreters/ interpreted languages weaknesses?

William Tanksley wtanksle at dolphin.openprojects.net
Wed Sep 1 19:02:34 EDT 1999


On Wed,  1 Sep 1999 16:13:58 -0500 (CDT), Skip Montanaro wrote:
[I said:]
>    WT> Java's not interpreted, though -- I've never seen ANY Java
>    WT> interpreter.  Java is always compiled, usually to bytecode, and then
>    WT> the bytecode machine is emulated.

>Same for Python and Perl.

Correct.  This does more to highlight the technicality of the word
'interpreted' than it does to say anything useful about the languages.

>It's just that you never see Perl's byte code
>(it's compiled each time you run your script and discarded at the end of the
>run)

IIRC, Perl is actually compiled to an abstract syntax tree, which is then
interpreted.  Perl is far closer to an interpreted language (IIRC) than
Java or Python -- but it's no disadvantage.

Oberon's Juice format actually works by saving the abstract syntax tree in
a highly compressed form, so it could be considered interpreted (certainly
far more so than Java), yet it's FAR more efficient and safe.

>and compilation of Python to bytecode is done automatically, though the
>results are saved for reuse in later runs in a .pyc or .pyo (optimized)
>file.  The only thing that makes Java "more compiled" than Python or Perl is
>that you have to explicitly run a separate compiler over the source to
>create a .class file.  Also, Java byte codes can be compiled "just in time"
>to native instructions by the Java virtual machine.  I'm not aware that this
>has been done on a large scale for either Python or Perl, though there have
>been attempts of various kinds for both languages.

Bingo.

>So, aside from the differences in how you get from source to running
>program, depending on your definitions, they can all be called compiled or
>interpreted languages.

They're all compiled (with the exception of Perl, assuming I've got my
facts right).

>Skip Montanaro | http://www.mojam.com/

-- 
-William "Billy" Tanksley




More information about the Python-list mailing list