The real reason to switch would be performance. The interpreted nature of Python that makes things like Django and PyUnit possible also makes it kinda slow. Some places choose to parcel out a few key services in a faster language (C, Rust, Go) and use bindings to call out as needed.
A lot of people get caught up on "x is slow, y is fast" and try to over-architect too early on, then end up focusing on the wrong parts of their product, and sooner or later the project falls apart.
Sure I prefer static languages nowadays since I work in a much bigger company, however I think the benefits of static languages is overhyped.
- We use standard tools like flake8, isort, black for code linting.
- We are not following TDD, but we do write tests for all features. Pytest helps here
- Proper code reviews. I cannot stress this enough. As a Tech-Lead I have pushed for code reviews even when working on (supposedly) tight deadlines.
- We are also exploring to use type hints introduced in Python3.7.
PS Shout-out to Poetry(https://poetry.eustace.io/) to make our dependency management easier than ever. Updating third party libs is a lot easier now.
There are four popular typecheckers that I'm aware of (mypy [1], pyre [2], pyright [3], pytype [4]), which is a little confusing, but any of the four will catch a lot of type issues that typical statically typed language compilers would catch. It's not as robust as true static typing - there are sometimes false positives and false negatives - but I find it helpful.
[1] https://github.com/python/mypy
[2] https://github.com/facebook/pyre-check
> ... and it becomes not so bad to work with
O_o
How did you manage to put these two statements in a single sentence implying positivity :)
Why do people choose to explicitly write unit tests over and over again for basic things which could be caught by a compiler?
People are losing so much productivity (both short and long term) and being deceived into not having the type system "stand on their way" while they're typing out the initial prototype. This always bites back when you start first significant refactoring.
I will never understand the appeal of the dynamically typed language. Modern, statically typed languages with strong type systems, provide so much more productivity, reliability and confidence in the codebase that it is really irresponsible to ignore them nowadays.