Using Python for programming algorithms

Lou Pecora pecora at anvil.nrl.navy.mil
Mon May 19 15:09:59 EDT 2008


In article <hifYj.43082$4B6.9014 at newsfe14.ams2>,
 Roel Schroeven <rschroev_nospam_ml at fastmail.fm> wrote:

> 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.


But how about this C/C++ interpreter.  Dr. Dobbs article:  
http://www.ddj.com/cpp/184402054.  Title and first two paragraphs:

Ch: A C/C++ Interpreter for Script Computing
Interactive computing in C 

Ch is a complete C interpreter that supports all language features and 
standard libraries of the ISO C90 Standard, but extends C with many 
high-level features such as string type and computational arrays as 
first-class objects.

For some tasks, C and its compile/ link/execute/debug process are not 
productive. As computer hardware becomes cheaper and faster, to be 
productive and cost effective, script computing in C/C++ can be an 
appealing solution. To this end, we have developed Ch, an embeddable 
C/C++ interpreter for cross-platform scripting, shell programming, 2D/3D 
plotting, numerical computing, and embedded scripting [1].

-- 
-- Lou Pecora



More information about the Python-list mailing list