Search posts, tags, users, and pages
We experimented a lot in this regard, and I think we will likely continue doing so. One thing that we found along the way is that it is very valuable to be able to look at the syntax and have a general idea of when a value is going to be borrowed or moved -- this makes a great deal of different with respect to what you can do with it! We also wanted to avoid the "implicit by-ref" that some other languages offer, where writing foo(x) can wind up mutating x, which can be quite surprising.
That said, I think we've been evolving this story this year. For example, the default binding modes RFC allows one to drop a whole bunch of *, &, and ref when working with matches. I also experiment that some of the ongoing experiments around Copy type coercions will lead to similar improvements, specifically around types like &i32, where the fact that a value is borrowed or not is not typically especially interesting.
(As an aside, one pattern that I personally find nice is to move the & or &mut to the point where a variable is initialized. In other words, instead of doing this:
let x = Foo::new();
use(&x);
You can do this:
let x = &Foo::new();
use(x);
This also serves as a way to signal to your reader that x will not be moved later on.)