Hacker News new | ask | show | jobs
by eddd-ddde 816 days ago
Yeah I think understand the sort of things you are talking about. Often times we have a "proof" that our code is safe in C. Maybe you are sending a pointer to a thread and then want to read from it at the end of your main thread. _You_ know it is safe because you made an informal contract of when that other thread stops using that pointer, but to Rust? informal is not enough. The hard part is knowing how to formalize all of those contracts. Send, Sync, 'static, all of those are a real pain to understand and know when to use correctly, but when you do it, you are formalizing those contracts. Now you don't just think your contract is held, it is _proven_ by the compiler.