other python ideas

Alex Martelli aleaxit at yahoo.com
Thu May 3 06:07:30 EDT 2001


"Douglas Alan" <nessus at mit.edu> wrote in message
news:lc66fj73fb.fsf at gaffa.mit.edu...
    [snip]
> > AND pretty doubtful that code-generation improvements would be
> > significant to Python's success as a language.
>
> It couldn't hurt.  (As long as they didn't come with negative
> consequences.)

Definitely -- but you were proposing to "remove excessive
flexibility" in order to enable code-generation improvements,
so the "negative consequences" were more or less ensured --
either an outright loss of flexibility (which, while you
may consider it "excessive" for your purposes, is put to
use by others), or addition of language features (so, less
simplicity) to enable specification of what 'flexibility'
may be 'removed' under what circumstances.

So, the overall modification might either hurt or help --
given that there are both pluses and minuses.  This makes
it important (as part of the study of the inevitable
trade-off) to evaluate how "positive" the pluses might be.

Alternatively, one might leave all the flexibility in, and
pay for fast code (to be generated only at need) in terms
of a (perhaps big, complex, slow) optimizing compiler able
to brilliantly infer types, etc, etc.


> > Why not give it a try?  There's a project called 'vyper' which aimed
> > to "remove excess flexibility" from Python and implement a much
> > better code generator for the new dialect/variant -- to top it off,
    ...
> In my copious spare time I'll be sure to check it out.  Thank you for
> the pointer.

Here's the pointer -- http://vyper.sourceforge.net/.

Stalin, at ftp://ftp.nj.nec.com/pub/qobi/stalin.tar.Z (I suspect
http://packages.debian.org/testing/devel/stalin.html may be more
up to date), is of course among the interesting studies in
optimizing compilers for dynamic languages; as far as I recall,
the only substantial limitation it gives is on LOAD and EVAL --
this IS a "flexibility removal", of course -- how "excessive"
the removed flexibility might be will depend on specific uses.


Alex






More information about the Python-list mailing list