Hacker News new | ask | show | jobs
by aliceryhl 2078 days ago
Rusts type system is able to carry a lot of information it can use to verify the memory safety of programs at compile time.

For example, the type system includes a piece called the borrow-checker, which is able to guarantee that pointers are still valid when you use them, which eliminates use-after-free and buffer overflows.

In a similar vein, the type system includes information about in which ways types may be shared across threads, and by using this information, the compiler can guarantee that there are no data races whatsoever in multi-threaded programs.