2005-06-19 · in Ideas · 206 words

Python's easily my favourite programming language at the moment, but it's getting too big for my liking; sure, metaclasses are a neat feature to have, but you'll never use them in the vast majority of programs. At the same time, Python's also too slow for a lot of applications.

One of the neatest developments in the Python world lately is the Pyrex extension language, which looks (mostly) like Python, but compiles to reasonably efficient C. Pyrex isn't designed for writing programs in, though, just extension modules -- I'd like it to be usable for anything that Python supports (calling into a "real" Python interpreter for running existing Python modules, something it's quite capable of doing). Applying type inference and specialisation -- particularly if someone can come up with a nice way of doing "duck type inference" -- should allow the generation of code for numeric stuff that's at least as fast as C.

I'd also like to be able to do without separate compilation, if it'll give me a speed improvement; modern machines really aren't short on memory, and the compilation step shouldn't take a lot of time when it's necessary (when you're upgrading a program, or a library that it depends upon). This'd avoid JIT overhead at runtime.