One of the reasons I love functional programming is it allows me to think less about edge cases, because values are passed as values.
If Rust passed copies instead of references by default, people who wanted performance could fight (or embrace, whatever your preferred term/level of experience is) the borrow checker, while everyone else could enjoy the fundamental safety of not sharing data.
> The biggest issue I have with the defaults, and the borrow checker is that places in FP where you would normally pass by copy — pass by value, in Rust instead it assumes you want to pass by reference. Therefore, you need to clone things by hand and pass the cloned versions instead. Although it has a mechanism to do this automatically, it’s far from ergonomic.
https://internals.rust-lang.org/t/why-do-i-have-to-indicate-...
Without examples or further clarification, I don't think it's possible to understand what the OP actually meant.
1. Anywhere I call clone(). That should be the default / automatic. 2. Anywhere where I can get copies than explicitly move for lambdas
The problem with the latter is that I have to call clone outside of the lambda and bind it to a short-lived variable into to get moved to the scope of the lambda.
(2) is interesting and I'd be happy to see work done there to make that nicer, but it's hard for me to understand that being a big sticking point.
Teaching people to keep this in mind is a hard problem.