Description
The Rc docs use the term "value" to refer to an RcBox
instance (and similar for Arc
). That's IMO a bad use of terminology: A "value" is something like "5" or "true" that does not have an identity beyond its mathematical interpretation; an RcBox
has a location so that even two distinct RcBox
that contain the same value (say, both contain "5") are "not the same".
This is particularly bad in the docs for ptr_eq
:
Returns true if the two Rcs point to the same value (not just values that compare as equal).
"5" and "5" are the same value, and yet Rc::ptr_eq(&Rc::new(5), &Rc::new(5))
returns false
. So IMO the docs are just wrong -- or rather, they are using the term "value" in the wrong way.
I suggest that we replace all/most uses of "value" in these docs by "reference-counted object" or maybe something involving "instance". I think that better conveys what is happening.
Opinions? Cc @Centril @SimonSapin @gnzlbg