On 11/20/13 5:05 AM, Sanghyeon Seo wrote:
I am against this proposal. As I understand, we will still keep
autoref, autoborrow, etc. in method calls. So I don't think inconsistency
argument holds. Neither does local readability argument.
It is a good point that a true emphasis on consistency between methods
and functions would have us perform auto-deref and auto-ref on all
argument positions. Then the LHS of `.` and arguments would truly be
treated the same way, which dovetails with UFCS pretty nicely.
I'm pretty nervous about performing auto-ref on function arguments,
though, *especially* `&mut` auto-ref. For some reason I expect that this:
let mut a = ~["x"];
a.push("hi");
may mutate `a`, while:
let mut a = ~["y"];
push(a, b);
will *not* mutate `a`. Do others have the same expectation?
Patrick
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev