4 ms·
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
by Ciantic 11y ago
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.
- eeZi 11y agohttps://www.python.org/dev/peps/pep-0484/ https://www.python.org/dev/peps/pep-0484/
- raverbashing 11y ago> 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.
- rattray 11y agoWhat about optional, inferred, lightweight static typing? Do those things ever suck? What would be bad about that?
- raverbashing 11y agoIf 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
- Ciantic 11y agoOptional 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/ 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.
- elktea 11y agoI 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.