Ownership and borrowing¶
Values are borrowed for reads and retained when stored, returned or captured
by an escaping closure. The compiler chooses scope allocation and counting.
Closures that stay within a call can borrow; escaping closures keep their data
alive. Private cells mutate locally; atoms synchronize shared updates. freeze
marks a shareable object graph frozen and weak avoids retaining a referent.
Cycles of strong references can leak; use a weak link where appropriate.
&x is an in-out place, not a second first-class reference. Passing the same
place to two in-out parameters in one call is rejected. Save the accepted
example for fibc explain FILE. Full rules: ownership,
types, and the checked Appendix A cases in
syntax.