Type Hinting vs Type Checking and Preconditions

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Tue Mar 7 17:39:55 EST 2006


Delaney, Timothy (Tim):
> Search for `python optional static typing` for discussions - the first
> two links from Google are blog entries by Guido from a year ago (there's
> also a third one linked from PEP 3000).

I am sorry. Yes, I have read those posts about a year ago, and I
remember most of them, but I can remember that the syntax was discussed
a lot... Nothing real has come out of those discussions, I think. We'll
see.
I like the typecheck API, it's not perfect but it's not bad (and can
probably be improved still, removing some parts, changing some names,
adding some things, etc.) and it allows most of the things suggested by
Guido, plus other things, without the need to change the language
syntax at all. Can't such annotations be used by the interpreter (and
by Psyco) to produce much faster code? I remember that for Guido the
purpose of optional types wasn't much for speed, but for other purposes
(like to build very large and complex systems, as Zope), but using it
for speed purposes in smaller programs too can be cute :-)

Bye,
bearophile




More information about the Python-list mailing list