Why not a Python compiler?

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Thu Feb 7 16:27:33 EST 2008


On Thu, 07 Feb 2008 09:06:32 -0500, Steve Holden wrote:

> Ryszard Szopa wrote:
>> On Feb 5, 9:30 am, cokofree... at gmail.com wrote:
>> 
>>> I don't know the exact details but I think the issue is the dynamic
>>> nature of Python makes it impossible to correctly store the various
>>> types and changes into compiled code. Someone else will probably be
>>> able to provide a good reason as to why it isn't very feasible, nor a
>>> good idea. If you want to speed up your python look at Psyco.
>>> http://psyco.sourceforge.net/
>> 
>> Yeah, but exactly what features make it so hard to write a compiler for
>> Python?
>> [...]
> 
> a. People tell me writing a compiler for Python is hard.
> 
> b. It's certainly way to hard for me.
> 
> c. But hey, I've heard about this neat language called Common Lisp that
> has a compiler. It looks a lot like Python.
> 
> d. So why can't you brainboxes write a compiler for Python?
> 
> Please tell me if I'm missing anything from this summary of your thought
> processes.


Be fair -- he's asking what specific features of Python make it hard. 
That's a reasonable question.


-- 
Steven



More information about the Python-list mailing list