4 ms·
Memory leaks are not uncommon on GNOME, and i assume on other desktops as well. But Rust is not just good for preventing memory bugs: strong typing prevents lot
by southerntofu 5y ago
Memory leaks are not uncommon on GNOME, and i assume on other desktops as well. But Rust is not just good for preventing memory bugs: strong typing prevents lots of logic bugs as well.
Also, rust's "fearless refactoring" paradigm enables for incremental optimization which i've found much harder to deal with in other programming languages. I think that's a point worth considering for a big piece of engineering like a desktop environment.
EDIT: Also memory bugs are not just "memory leaks". There's plenty of subtle bugs introduced by off-by-one errors and undefined behavior. Just because memory usage doesn't rise unexpectedly doesn't mean software is working as intending. I don't know about you but i personally have had weird bugs with all desktops i've tried so far.
- fredros 5y ago> But Rust is not just good for preventing memory bugs: strong typing prevents lots of logic bugs as well. Arc<> does exist though, and is used quite extensively in the rust ecosystem.
- southerntofu 5y agoI personally never had problems with Arc<RwLock<T>>. The docs appear really clear about in what situations precisely it can be unsafe (if T is not Send+Sync): https://doc.rust-lang.org/std/sync/struct.Arc.html https://doc.rust-lang.org/std/sync/struct.Arc.html Am i missing something? Disclaimer: i'm not a good programmer, nor a low-level programmer; i use Rust as a faster/safer python-like high-level scripting language
- cle 5y agoWe all have heard the elevator pitch for Rust by now, since all it takes is for a submission to say "written in Rust" for it to appear on the front page of HN.
- Aeolun 5y agoDo not worry. You will be assimilated.