Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Due to the pain that concurrency is in Python, the codebases I've seen mostly shared data only via external processes (queues, databases).

I was very surprised to read the article. I think in the code I have in mind the borrow checker would only add overhead.

The most frequent errors I see in the Python webapp code are: 1. logic errors, especially around concurrent DB transactions, 2. type errors (missing values, improperly modeled data), 3. performance problems.



Well the article is about writing a database, which is definitely going to need concurrency and communication via shared memory to deliver the performance that it needs to (which is why the original implementation was mostly C++ and the new one is Rust). But yeah, I think in general if you're running into issues with mutability in Python, you're either using Python for something it should not be used for, or you're just programming in a really weird way.


It's not only threads. It's also explicit in whether a function can modify an argument because it's type signature says this with the mut keyword.


You're right. It just doesn't seem to create much issues in the application code I have experience with.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: