3 ms·
I like this approach - We use python for our backend and the things I miss the most from other languages are the protected/public/private keywords (Java), singl
by calderwoodra 3y ago
I like this approach - We use python for our backend and the things I miss the most from other languages are the protected/public/private keywords (Java), single-line `if condition: return` statements (js, ruby, etc.), and npm/yarn/package.json (js). I miss types too but it feels unfair to complain about that with Python.
- scubbo 3y agoFair point re: package management - but Python does support single-line conditionals, and reasonably robust type-checking with mypy.
- calderwoodra 3y agoMyPy isn't quite as nice as typescript, and it also has some trouble with Django. I know it CAN work, but does any language have a worse type system? Maybe Ruby. For single line conditionals - looks like you're right from that I can tell. I mistakenly assumed the pep8 errors were actually interpreter errors. Thank you!
- scubbo 3y agoGlad I could help :)
- talideon 3y agoI believe that the reason you're having issues with Django is that Django lacks types on its external interfaces. This isn't an issue with MyPy. You're conflating language-level issues with code-level issues. Python's type hints are quite powerful, assuming you're using stuff that provides them. At this point, it has a better type system than Go (if only because it has sum types and option types), but it's opt-in.