Viewing a single comment thread. View all comments

chars101 t1_jcoa9kp wrote

> Also speed isn't everything, especially if it comes at the cost of increased crashes due to errors from code complexity.

Strong typing gives Python an advantage over weakly typed languages like PHP and JS in managing complexity. But I see the advent of type annotations as an attempt to deal with the complexity large systems that people have built, like the ones you mentioned. Much like Typescript tries to do the same with JS code bases.

I've seen my fair share of hard to reason about Python code that breaks at run-time.

I'd rephrase what you said to "Speed isn't everything if you're IO bound." The places where Python has traditionally has been most popular is where it's shoving data around with perhaps some small manipulations. Feeding render pipelines at ILM, web development after people got fed up with the absence of design in PHP 3/4/5 or inheriting unreadable Perl CGI and now datascience and machine learning where it's used to hands on explore the data massage and then do the bulk of work in libraries implemented in Rust or C(++).

If correctness and speed aren't vital, it let's you do a lot with very little. And there's a large community that shares their tooling to help deal with those shortcomings (mypy, pyright, pyre, hypothesis, pandas, polars, PyO3) so you can postpone reimplantation of your Python prototype in a language that is more able to the point where it is unfeasible to do so.

3