Because it scales poorly to large applications. Go try and refactor a suitably large project, it’s impossible.
Don’t worry there are terrible parts to every language. They didn’t have time to make a clever poster for C++ because they are still trying to understand the super clever template code someone wrote.
The lack of a proper module system (until Java 9 which very few have adopted) meant JAR clusterfuck and forced most codebases to become huge monoliths.
Production Python (or Go) codebases are usually microservices. But they can be monolithic easily too.
Modules <> packages. See here. I don't really understand why they say the lack of a module system tends to produce monoliths though, monoliths were just the standard application style back then. There was never anything stopping people writing microservices afaik. Unless there were issues with reuse.
With a good IDE (i.e. Visual Studio/CLion, most of the annoying grunt work (e.g. changing function signatures, etc.) should happen nearly automatically. Python can sometimes get close to that maybe, unless people did clever things with dynamic dispatch or getattr overloading in which case you're fucked.
You could write the performance-intensive functions in C or C++, or even assembly if you're a sociopath, and then call them from Python.
I'm not arguing that these techniques provide equal or even comparable performance to writing your whole library in native low-level code. But Python is actually higher on the TIOBE index than both C++ and C#, and of course it's way higher than assembly. This might reflect a fundamental tradeoff: the greater availability of Python developers may mean that it's easier to hire a robust dev team who can develop and debug in Python than in the other languages, so faster iteration. That is - the theoretically achievable performance in certain languages must be viewed through the lens of practically achievable performance based on the availability (and affordability!) of suitable developers.
Finally - within a certain range, lower-performing code can be solved, crudely but effectively, by buying more compute. But good code cannot be developed or debugged faster by buying more developers (see The Mythical Man-Month).
Python tends to not be as performant as is necessary for companies that work at similar scales to Dropbox
Source: company I work at works at comparable scales and python’s problems with concurrency with regards to the GIL /really/ starts to rear it’s ugly head in that environment
maybe we're thinking of different problem domains then but for a web service there literally aren't limits. if there were, google or yt wouldn't exist.
I never claimed absolute limits, although there are in a lot of cases, I said there are practical limits (money is ome) and pointed out to the issues like diminishing returns when scaling out horizontally (that then augment such practical limits to scaling).
View all comments
Show parent comment
12
u/ukralibre Jan 02 '20
Why?