Hacker News new | past | comments | ask | show | jobs | submit login

"[W]ith "NO unsafe code...."*

* except all the unsafe code in the dependencies (e.g. https://github.com/tokio-rs/tokio/search?q=unsafe)




Clearly nothing can be truly safe then if you ever use the standard library ;-)


You know, people outside the Rust community keep bringing this up as some kind of argument against it. But to me, it's one of the biggest points for it; because the important thing about `unsafe` encapsulation isn't what's inside of it, but what's possible on the outside.


I bring it up because Rust evangelists like to pretend that Rust code with no explicit “unsafe” in it is safe. It’s not safe, though, as long as the dependencies use it.

I enjoy coding in Rust. I don’t enjoy the shit name its community gives it.


All safe code that exists in any language is built on unsafe code. Unsafe code is fundamental to computers. Your frame is unhelpful, not illuminating.


All safe language runtimes use unsafe code by this logic.


Does that also apply to GC-languages?


Yes, if you dare to look into a GC implementation, you might see some truly unsafe code indeed


You can't have 100% safety all the way down. Garbage collection doesn't help you if the VM itself has a memory leak or some driver crashes.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: