News for hackers. Stuff that matters.
Re:Bugs that the Rust compiler catches for you by ZephyrBlu on Thursday May 05, 2022 @07:57PM (#31279602)
I recently ported some Python to Rust and I actually did feel like a lot of the Rust code was pretty similar to Python.

Mutating things is mostly not that difficult, just add mut to the declaration and then &mut if you pass it around.

The most difficult thing was lifetimes.

E: borrows got a little tricky as well

Re:Bugs that the Rust compiler catches for you by carlmr on Friday May 06, 2022 @03:22AM (#31282321)
This is what I mean, I ported some Python code almost 1:1.

If you program in a functional way anyway, i.e. having data go through a series of filters, it is quite easy. But not all ways of programming are so easy to port to Rust.