4 ms·
I'm not that familiar with Rust It is often best to not comment on things you don't understand. but, as far as I can see, Ah you'll power though anyways!
by valarauca1 9y ago
I'm not that familiar with Rust
It is often best to not comment on things you don't understand.
but, as far as I can see,
Ah you'll power though anyways!
it makes sense to say that Rust's borrow checker is an
interface to a O(1) garbage collector [...]
You aren't _that_ far off in terms of CS fundamentals there is a lot of theory you are missing. Rust's _GC_ is called RAII [1] it is used by C++ as well. Effectively the compiler traces the lifetime of an object and inserts a drop/free/destructor call when it leaves scope.
[1] https://en.wikipedia.org/wiki/Resource_acquisition_is_initialization https://en.wikipedia.org/wiki/Resource_acquisition_is_initia...
- runeks 9y agoIt would have been more clear for me to have said: "for the purpose of discussion, let's view Rust's borrow checker as an interface to a O(1) garbage collector [..]".