Not really, my company uses Python by default and only ports stuff out when it’s not fast enough. It’s usually fast enough, the performance critical stuff is a tiny fraction of your code. If you can be more productive the rest of the time, you’re still ahead.
Yep, but losing the ability to refactor large code bases significantly hampers their longevity. There are ways around it as well.
Honestly I don’t know if performance is really the issue. There are plenty of generalized libraries for getting large computation done quickly. It’s really maintenance in my mind.
I don't understand what problem you have with refactoring python code. As long as you make use of type hints (which you should be in a large code base with many developers anyway) it seems to work pretty much like any other programming language.
I'm using type hints on a 100k LOC Python backend, and I'm also using Typescript on the similarly sized frontend. The difference is night and day. Mypy/pyright are slow (as in, several seconds between typing and seeing the errors show up). They're unreliable: they have both false positives and false negatives. They're buggy: they crash all the times. Python libraries either have no type hints at all, or they're sprinkled with Any. Type hints syntax is simply horrible and forward/circular references are a pain. Reusing expressions syntax for types and making the hints executable at run time were big mistakes. Type hints add a ton of verbose boilerplate and in the end they fail at the most important thing: ensuring type safety. Even a simple class rename, which is 100% reliable in all static languages is not safe at all in Python. You always need to run unit tests and manually check the code to make sure everything is renamed correctly.
It was nice to start with project with Python and it worked great at first. Now, after 3 years, I'm wishing I picked a statically typed language.
99
u/ketralnis Jan 02 '20
Not really, my company uses Python by default and only ports stuff out when it’s not fast enough. It’s usually fast enough, the performance critical stuff is a tiny fraction of your code. If you can be more productive the rest of the time, you’re still ahead.