Oliver Steele does a better job than me at explaining my position on optional type declarations. (Via Patrick Logan’s blog.)
Anyway, he’s given a pretty decent summation of my interest in type declarations, even though he doesn’t mention adaptation. Syntactical support for adaptation would actually be a use case where a declaration syntax would be as good or better than the current alternative.
But in an off-list e-mail today on a related subject (an idea for better function signature introspection, independent of argument typing), Guido mentioned that:
“Adaptation is one use case for having a better type system, but I don’t want to focus so much on run-time use of the types (although the types will be inspectable at runtime of course). I’ve thought about the motivation, and I’ve come to the conclusion that my own primary motivation is to be able to integrate PyChecker into the core; the type annotations should help it where it gets stuck. But please don’t reply here, read the next blog entry (hopefully I’ll find time for it this week).”
You probably also shouldn’t bother commenting here either, as he also mentioned that he rarely reads blogs, and if he hadn’t written it himself, he’d probably have missed his own article about type declaration. 🙂
Well, Guido may not read blogs, but I’d encourage him to read Oliver’s posting. It’s lengthy, but insightful. Thanks for mentioning it.
— Michael Chermside
He did read it. See his new post under “Motivation”. I sent him a link in the reply to the above-mentioned email, and others might have sent it to him as well.