Hacker News new | ask | show | jobs
by weitzj 1105 days ago
I have not programmed Rust, yet. But this article gives me a feeling that this looks similar to database transactions. This might be wildly wrong but for me I see an analogy:

Once you get the &mut reference, you have your tree, which then looks to me like you have created a transaction. An in this transaction context you do your things.

1 comments

This is a good intuition, Rust's references can be thought of as a r/w locks.