News for hackers. Stuff that matters.
Re:Bayard: a full-text search and indexing server written in... by wilsonthewhale on Friday November 01, 2019 @11:41AM (#21419974)
everything needs unsafe code to run, since it has to interact with the OS/CPU/outside world. Rust's main contribution is that provides ways for you to clearly section off and declare that code is "unsafe" and needs extra examination to uphold its invariants.

as an example, std::vec::Vec is implemented with quite a bit of unsafe code, but all Rust consumers can be confident that it is vetted and the abstraction presented around it is safe.

of course, this isn't a perfect solution, but it's much better than e.g. C/C++, where you basically treat every line as "unsafe".

There are no comments on this comment yet.