[Tutor] Will there ever be a native python compiler to create pure exe and dll
Alan Gauld
alan.gauld@blueyonder.co.uk
Sun Jun 1 16:41:02 2003
Responding to the Q in the subject...
Probably not since pure EXE and DLL's are going the way of the Dodo.
Microsoft's new .NET environment works exactly like Python in that
code gets compiled into an intermediate language and executed by
an interpreter. Thus its far more likely that someone will produce
a Python to .NET compiler, in fact I believe I read somewhere that
its already being worked on. At that point Python will then operate
exactly like C#, VB.NET, Java, etc etc.
In fact Python's structure, like most dynamic languages makes it
hard to produce a pure EXE compiler. One of the reasons Python is
so powerful is precisely because it has the ability to dynamically
change its behaviour, but that is very difficult to compile
effectively. (How do you compile an exec or eval statement for
example? Especially if the string being evaluated creates a
new class, say.)
Other examples where major languages have proved difficult to
compile into "pure executables" (ie no embedded interpreter) are
Smalltalk, Prolog, Lisp and VB.
(Now the Lisp folks will start to complain - sorreee! :-)
Alan G.