3 ms·
Less divergent code does not make better code. Rc<RefCell<>> is a prime example of "Do as we say, not as we do" in Rust that has made its way in from C++. I tho
by reactordev 3y ago
Less divergent code does not make better code. Rc<RefCell<>> is a prime example of "Do as we say, not as we do" in Rust that has made its way in from C++. I thought the borrow-checker was gospel and yet, here we are on the cusp of circumventing that with dynamic memory allocation checking (or lack thereof, just that it's the same size).
- zozbot234 3y agoRust has always supported some variety of Rc<…> because the borrow checker cannot account for every possible way of writing safe code. It's not something that has "made its way in" from the outside, it's just as inherent to the language as anything else in it.