[Python-3000] Type annotations: annotating generators
Paul Boddie
paul at boddie.org.uk
Fri May 19 18:14:32 CEST 2006
Guido van Rossum wrote:
>
> I'm not convinced that we need all this for the likely intended use,
> since static type checking isn't really high on the agenda anyway.
I know I'll get into trouble for quoting this out of context, and I accept
that there's a difference between static typing and writing declarations that
look like static type declarations but which operate at run-time. However, I
keep wondering whether we're missing out on something by adopting a type
description language that will either prove to be inadequately expressive or
evolve to something on the level of a full programming language in its own
right.
What's the general opinion on systems which attempt to infer and predict
inappropriate type usage? (Which I'm guessing is the main motivation here,
rather than performance, which if I recall correctly, was downplayed in the
context of "optional" type declarations.) By "predict", I mean something that
operates before run-time; not something which tells you 100ns before an
exception is raised. Couldn't such systems be a better aid to program
reliability? Would "optional" type declarations be relevant to the operation
of such systems?
Paul
More information about the Python-3000
mailing list