[Tutor] Hasn't Python got a compiler?

alan.gauld@bt.com alan.gauld@bt.com
Fri, 5 Nov 1999 10:36:30 -0000

> I thought, just like most languages, that python could create 
> executables able to run on other machines without python. 

I think you'll find that *most* languages do not in fact do this.
The vast majority of programming languages are interpreted. 
Some later aquire compilers. It is the minority that are 
designed from the beginning to be compiled. [Note that the 
vast majority of programming languages are also relatively 
obscure - CLU, Haskell, B, DSL, etc]

Many modern languages, including Python, use a hybrid 
approach of compiling to some kind of byte code.
Some other popular 'hybrid' languages include:
Perl, Java, Lisp, Smalltalk, 
Visual Basic, Prolog, Logo.

Pure interpreted languages include:
awk, Bourne/Korn shell, Tcl, snobol...  

Several of these have native code compilers 
available now too.

Requiring the platform to be on the target machine is not a 
big issue if enough programs use it. Consider the success of 
VB on Windows. It requires a 1Mb DLL on the target PC, but 
lots of VB apps can share it and so nobody complains. The 
individual VB apps are much smaller as a result. Similarly 
with Python, the individual apps are small so the one-off 
payload of the environment isn't so bad.

Performance is rarely an issue.

Alan g.