News for hackers. Stuff that matters.
Re:Rust – A hard decision pays off by rowanG077 on Thursday August 25, 2022 @06:49AM (#32591988)
While the big one for rust borrowing system is memory bugs it als make it extremely specific what can be mutated. And there can only be a single mutator at any time. Unless you explicitly write something to work for multiple mutators. This makes many logic bugs much more obvious even though you could still make them.

And of course you don't have nullability which is another big one.

Re:Rust – A hard decision pays off by krab on Thursday August 25, 2022 @06:58AM (#32592059)
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.

Re:Rust – A hard decision pays off by s17n on Thursday August 25, 2022 @11:32AM (#32595108)
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.
Re:Rust – A hard decision pays off by rowanG077 on Thursday August 25, 2022 @08:06AM (#32592576)
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.
Re:Rust – A hard decision pays off by krab on Thursday August 25, 2022 @08:26AM (#32592784)
You're right. It just doesn't seem to create much issues in the application code I have experience with.