News for hackers. Stuff that matters.
Re:Rust solves the problem of incomplete Kernel Linux API docs by yencabulator on Saturday August 31, 2024 @07:29PM (#41412848)
Concrete example for those not familiar with Rust:

In most languages, you have a lock on the side that you need to remember to take to protect some data. In Rust, the lock wraps the guarded data, you can't access the data without holding the lock, you can't forget to unlock, and you can't keep a reference alive while releasing the lock.

https://doc.rust-lang.org/std/sync/struct.Mutex.html

https://doc.rust-lang.org/std/sync/struct.MutexGuard.html

There are no comments on this comment yet.