Using Python for programming algorithms

Roel Schroeven rschroev_nospam_ml at fastmail.fm
Mon May 19 09:30:52 EDT 2008


Bruno Desthuilliers schreef:
> 1/ being interpreted or compiled (for whatever definition of these 
> terms) is not a property of a language, but a property of an 
> implementation of a language.
> 
> 2/ actually, all known Python implementations compile to byte-code.
> 

You keep saying that, and in theory you're right. But I'm still inclined 
to disagree with it, since the practical reality is different. Python is 
indeed compiled to byte code, but if you compare that byte code with 
assembly code you'll see that there's a whole world of difference 
between the two, largely because of the dynamical nature of Python. Fact 
is that Python was designed from the start to run on a virtual machine, 
not on the native hardware.

C OTOH was designed to be compiled to assembly code (or directly to 
machine code) and as a result there are no (or virtually) no 
implementations that interpret C or compile it to bytecode.

I love Python, but IMHO it's a bit silly to maintain that the fact that 
Python compiles to byte code instead of assembly code/machine code is 
purely a matter of implementation; on the contrary, I believe it's a 
result of its design. I also think that there's a large difference 
between byte code and machine code (in Python's case; I haven't looked 
at other languages), and that it's a bit silly to try to trivialize that 
difference.

-- 
The saddest aspect of life right now is that science gathers knowledge
faster than society gathers wisdom.
   -- Isaac Asimov

Roel Schroeven



More information about the Python-list mailing list