Python compilers?
Paul Rubin
http
Wed May 19 21:59:14 EDT 2004
imbosol at aerojockey.com (Carl Banks) writes:
> > >>> a.bar = lambda x: x*x*x
> > >>> a.bar(3)
> > 27
>
> Well, come on, of course there's going to be some things here and
> there you can do in one and not the other. In wat is Python dynamic
> that Lisp isn't to such an extent that it would cripple any attempts
> to compile it?
The example above kills any attempt to turn a.bar() into a static
procedure call. There's more like it, e.g. the existence of the
locals() dictionary and the ability to modify it. However, it should
be possible to define a reasonable subset of Python that can compile
into good code. The stuff that makes compilation difficult makes the
code unmaintainable too.
I do think that Python's designers should wait til PyPy with
native-code backends has been deployed for a while before defining too
much of Python 3.0, so we can first gain some experience with compiled
Python. Python should evolve towards being compiled most of the time.
More information about the Python-list
mailing list