News for hackers. Stuff that matters.
Re:Writing Pythonic Rust by colejohnson66 on Monday May 24, 2021 @10:48PM (#27272121)
> It's not about performance; it's about saving yourself the time of having to come back to your code a month later because your TODO app is using a gig of RAM and randomly hitching.

If your GC program is using excessive RAM, that’s because of a memory leak, not the garbage collector. This can happen in C/C++ as well; just malloc/new and forget to free/delete. Last I checked, C and C++ aren’t garbage collected languages.

Re:Writing Pythonic Rust by throwaway894345 on Tuesday May 25, 2021 @06:51AM (#27275267)
It can also happen in Rust.
Re:Writing Pythonic Rust by wizzwizz4 on Tuesday May 25, 2021 @10:33AM (#27277291)
It's rarer, and you can rule it out entirely by just not using types that let you leak memory. Afaik, circular `Rc` references, `Box::leak` (and friends), `MaybeUninit` and overzealous thread spawning are the only ways of leaking memory in safe Rust.
Re:Writing Pythonic Rust by throwaway894345 on Tuesday May 25, 2021 @12:41PM (#27279086)
Even if you avoid those things, how does safe Rust make leaks more rare than in a GC language? Presumably leaks in a GC language or safe Rust are almost always going to be stuff like “pushing things into a vector repeatedly even though you only care about the last item in the vector”, and clearly safe Rust doesn’t stop you from doing this any more than a GC.

Note also that GC languages don’t even have the circular references case to worry about since they don’t have any need for reference counting in general.