Hacker News new | ask | show | jobs
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.]

1 comments

That sounds sweet! It's been a while since I did anything in Python (at work, for various reasons, I mostly use Perl when I can, C# when I have to). But the next time I do something with Python, I'll make sure to check it out!