GvR gets ML-envy

The madness of Guido van Rossum progresses apace. Did I say madness? I meant visionary blue-sky thinking, obviously.

I don’t know what approach to type-checking would be best for Python, but I would hope for something more Pythonic. Some standardisation of the various interfaces and adaptors offered by Zope, PEAK and Twisted could be good – they come from the Python culture, and reflect the needs of actual Python developers now.

Beyond that, it all depends what it’s for.

If it’s for making Python go faster, then much of the machinery provided by a sophisticated type system is probably besides the point (or on the wrong side of the 80/20 split). I’d guess that the biggest gains will come simply from knowing that foo is always a string and bar is always an int. If you want to know what a list is a list of, look at the type of the variable used to iterate over it: for foo::int in bar. If you’re going to have typed tuples, why not go the whole hog and make them structs/records?

If it’s for expressivity, then fine but it won’t really be Python any more. The Python school of expression is quite distinct from the ML school or the Java school. This is a good thing.

If it’s for providing static guarantees, then choose another language frankly.

Leave a Reply