5 ms·
I'm a university student, and as a thesis project I've been working on a static type-checker for Python. I'm interested to see if people think this would be of
by rubergly 16y ago
I'm a university student, and as a thesis project I've been working on a static type-checker for Python. I'm interested to see if people think this would be of practical good (my advisor and I certainly think it could be).
- m0th87 16y agoI would be extremely excited about a static type checker, and given how favorably Python is seen in this community, plenty of others would be here as well. So please do post when you have a finished product! I'm sure you've seen these already, but if not, they would be highly relevant: * GvR did a commentary on some of the challenges that would arise with an optional type system: http://www.artima.com/weblogs/viewpost.jsp?thread=85551 http://www.artima.com/weblogs/viewpost.jsp?thread=85551 * Python 3 included some syntactic changes precisely to support things like type checking: http://www.python.org/dev/peps/pep-3107/ http://www.python.org/dev/peps/pep-3107/
- rubergly 16y agoI indeed have read Rossum's blog posts, but I haven't been following Python 3 at all, and only found out about annotations after looking at Pytyp, so that's definitely interesting and helpful, thanks.
- andrewcooke 16y agoif you mean inferring types from un-annotated programs, it has been tried a couple of times - if you search around you can find other people's attempts (i think there is a thesis and a dead project on the net). [To answer your question; I think it would be useful (I once started work on something similar myself, but never got to actually unifying types). However, the fact that other people have tried and failed to be come popular suggests that there are (more) problems (than you might expect).]
- rubergly 16y agoI'm not trying to do type inference (yet, that might be a direction of expansion for next year), and, anyway, my program is demanding type annotations in docstrings.