The Rust Borrow Checker – A Deep Dive
I would urge particularly c++ people to try rust. It&#x27;s not really a huge jump thinking about borrowing, especially as you&#x27;re already thinking about move&#x2F;copy semantics in modern c++.<p>I wrote a trading system in rust recently, it was a breeze. I was never stuck with strange issues or crashes, everything that went wrong was reasonably clear. With c++, once you get a segfault you never really know if you&#x27;ve actually fixed it or just gotten lucky. Mysterious crashes are also a huge timesink, because you tend to have to stop what you&#x27;re doing on look at what happened, and then when you fix it it&#x27;s quite possible you&#x27;re just relocating the problem. Even if you avoid those issues, you will have to periodically run through your code with some valgrind or similar tools, and then you have the awkward &quot;should I do something about this warning&quot;.<p>I don&#x27;t think this dive was terribly deep though. It was good to look at the IR representations, but what often trips people up isn&#x27;t that textbook use-after-move example. I&#x27;m sure there&#x27;s a menagerie of strange &quot;why does the borrow checker complain&quot; examples where it&#x27;s a little less obvious why the lifetimes are wrong. In particular, when you have to annotate the lifetime yourself, things get weird and it&#x27;s not always obvious what to do.