News for hackers. Stuff that matters.
Re:Rust and C++ Interoperability in Chrome by atoav on Wednesday August 19, 2020 @05:17PM (#24216647)
I use Rust. Unsafe is okay as long as there is a comment detailing why it is okay. Just like .unwrap() is okay for stuff that never fails.

What is indeed bad is code that sprinkles unsafe all over the place without explanation and if you check a random segment fails to handle common error cases that pure Rust would force you to handle.

Re:Rust and C++ Interoperability in Chrome by dllthomas on Thursday August 20, 2020 @01:30PM (#24225924)
> Just like .unwrap() is okay for stuff that never fails.

Never fails, and will also never fail in the future as other code changes. There are certainly situations where you can be sufficiently confident of that, but it's something to think about.