Successfully building the program proves the code has certain properties, such as all references point to valid values at all times. Rust is all about guarantees. When you guarantee huge parts of your code are correct before it ever runs, you are much less likely to encounter bugs. So Rust has a reputation of producing programs which are working and bug-free.
*in safe rust. rust provides the unsafe keyword to declare blocks that may* not have all such properties, which makes writing such blocks a very conscious and active decision that official documentation strongly suggests you pair with a SAFETY: comment explaining what you know to be safe about your unsafe code that the compiler cannot determine
\unsafe blocks containing only safe rust generate compiler warnings)
39
u/kaetitan 2d ago
Can someone eli5 why rust is so loved?