Hacker News new | past | comments | ask | show | jobs | submit login

I've used Django a lot, however for past few years I've wanted to transition to type safe languages. Python should get serious about static analysis, e.g. mypy or some such, they provide a great way to increase productivity, and help you refactor if something changes.

I tried with Atom and (jedi) plugin, get this `CharField([Ctrl+Space]`, it fills me with `CharField( * args, * * kwargs)`, sigh.





> Python should get serious about static analysis

Then it's not python

I love people trying to shove static typing onto python when there's a multitude of other choices to pick.

The alternatives suck exactly because of that.

If you want static typing go use Java, Go, etc.


What about optional, inferred, lightweight static typing? Do those things ever suck? What would be bad about that?


If you want a static check of your program, use PyLint, it's excellent at detecting most errors, be them syntax, typing error (things like x = 10; x.do_stuff() )

I think annotations would be useful in very few cases, since interfaces are not bound by types and that's what's good about python


Optional typing is definitely coming. As eeZi pointed out, and I've been following this in the mailing list also. https://www.python.org/dev/peps/pep-0484/

Guido is pushing to standardize mypy as static analysis for py3k, but it is taking so damned long, meanwhile something like TypeScript is already superb with it's compiler service architecture providing great tooling for all kinds of editors & IDE.

PEP484 is simply too little, to get good tooling it requires compiler service (API for IDEs), and we are long way from that.


I agree, I've been looking for something as good as Django in languages like Java, Go, and even Rust but I haven't stumbled across anything equivalent yet.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: