On Wed, Jan 1, 2014 at 9:12 PM, Patrick Walton <pwal...@mozilla.com> wrote:
> There is no "real answer" beyond the one I already gave: that we are > already precisely as explicit as C, that Rust references do not actually > have the hidden mutation hazard of C++ references, and that changing would > place the language in a different space entirely. > Patrick, I disagree with this point. Rust references *do* have hidden mutation hazard, as do C's and C++'s pointers. In all three, mutation hazard is only obvious when you take an address of a stack variable. After that, when you already have a pointer, you pass it around, and never know who might mutate the underlying object. And let's not forget about the heap-allocated objects, which start out as pointers in the first place. Well, since requiring '&' at the original borrow site doesn't really prevent the "unexpected mutability" problem, why not drop it and eliminate a bunch of noise from Rust sources? And, again, if "unexpected mutability" is what concerns people, "mut" annotation is the better way to fix that, IMHO. > Please don't suggest that I am (or that anyone else on the list is) being > dishonest. > My apologies, I didn't mean to imply that. Vadim
_______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev