[Python-Dev] C AST to Python discussion (original) (raw)

Jeremy Hylton jeremy at alum.mit.edu
Thu Feb 16 13:49:08 CET 2006


On 2/16/06, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:

Whereas if there weren't any funky coding style in the first place, more potential compiler hackers might be encouraged to have a go.

I'm trying to make the code simple. The style of code is different than other parts of Python, but a compiler is different than a bytecode engine or implementations of basic types. Different problem domains lead to different program structure.

Also I'm still wondering why we're going to all this effort to build a whole new AST and compiler structure if the purpose isn't to avoid all this transformation between different representations.

The goal is to get the right representation for the problem. It was harder to understand and modify the compiler when it worked on the concrete parse trees. The compiler now has a couple of abstractions that are well suited to particular phases of compilation.

Jeremy



More information about the Python-Dev mailing list