Does Python really follow its philosophy of "Readability counts"?

Paul Rubin http
Thu Jan 15 04:29:26 CET 2009


Scott David Daniels <Scott.Daniels at Acm.Org> writes:
> But, the research on the language "Self" shows that even in the face
> of a language with more dynamism than Smalltalk (or Python), performance
> can be obtained using compiler technology.  It turns out you don't have
> to type those type any extra keystrokes.  Compilers capable of doing
> strong optimization already have to do enough analysis that they can
> discover the static typing that is available in the code you write
> naturally.   The way to get to such performance on Python is through
> efforts like PyPy.

I'd be interested in seeing any publications about that Self research,
which I remember someone else mentioning in another thread as well.
However, part of the idea of the extra keystrokes is to allow the
compiler (or an external tool like Pylint) to flag any
type-inconsistency for closer programmer inspection, instead of just
quietly treating it as dynamic and generating the extra code for it.
The keystrokes let the tool know exactly when the dynamism is
intentional.  As has been mentioned a few times already, Python 3.0
has some rudimentary features for type annotation, so this concept
isn't completely anathema to the Python developers.



More information about the Python-list mailing list