Is Python "Compiled"?

Steve Holden sholden at holdenweb.com
Thu Feb 8 12:32:29 EST 2001


"Hannah Schroeter" <hannah at schlund.de> wrote in message
news:95ug7b$qp0$1 at c3po.schlund.de...
> Hello!
>
> In article <5Iig6.1295$D3.5361 at tor-nn1.netcom.ca>,
> Warren Postma <embed at geocities.com> wrote:
>
> >[...]
>
> >Various efforts to build a Compiler are in "research stages".  Dynamic
> >languages don't respond well to attempts to compile them.   .
Nevertheless,
> >some very smart people seem to be trying.
>
> What about Lisp, which is very often compiled to native code?
>
> Besides, JIT technology is also there, already for a long time
> (look at Smalltalk implementation techniques and see stuff implemented
> a decade ago which they just "discover" for Java).
>
> Bottom line: I don't think that "dynamic languages don't respond well
> to attempts to compile them". Techniques are there (again, see Lisp,
> see Smalltalk, see Cecil/vortex for examples). I'd believe that
> techniques from Smalltalk implementations could also apply to the
> Python language.
>
> >Warren
>
> Kind regards,
>
> Hannah.
>
Well, LISP is kind of special: the typical list representation and
car()/cdr() operations are pretty efficient if properly compiled. But most
interpreted languages end up "compiling" down into calls to the interpreter
bytecode routines, which doesn't save much space or time. That was certainly
true for Icon, anyway, and I suspect would be for other similar languages.

JIT might or might not be a win for Python, but programs would still end up
lugging a lot of support code around, and without static typing a lot of
decisions still have to be deferred until run-time.

regards
 Steve





More information about the Python-list mailing list