|
|
|
|
|
by ddfisher
3531 days ago
|
|
This is exactly what mypy allows, actually! (Except for speedups -- types currently have no effect on runtime behavior, and it turns out they wouldn't make a big difference anyway.) The hybrid type system concept is called "gradual typing", and it's actually powered by some somewhat-recent developments in programming language theory. See this seminal paper by Jeremy Siek in 2006 if you're interested in the details: http://scheme2006.cs.uchicago.edu/13-siek.pdf [Source: I'm a mypy core developer.] |
|