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

I think it's time to rewrite the brain in Rust, making use of its memory safety features to prevent memory leaks


Rust does not prevent memory leaks.


No? Really? So what is the point? Why are people so crazy about Rust?


Yes.

> So what is the point?

What Rust helps with is memory safety, which is stuff like dangling pointers and use-after-free. Memory leaks are not a safety issue, they're an efficiency issue.

> Why are people so crazy about Rust?

The whole memory safety thing isn't actually the reason so many people love Rust. In the Rust 2024 community survey, 82% of users agreed that "Rust allows us to build relatively correct and bug free software." Memory safety is part of that, but there's a lot more to it.

So, for example, while Rust does not guarantee the lack of memory leaks, it does make them relatively hard to produce by accident in the first place. This is due to the intersection of a few different parts of Rust's overall design.


I have heard that rust can cause tetanus, which is not good for the brain.


Rust itself cannot cause tetanus but it can include unsafe blocks which can activate tetanus spores by FFI.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: