-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Seeing clone all over the codebases makes me cringe with no way to know if it's an expensive one or if it's just a reference increment. One has to dig back all the way to type to understand what it actually means.
Would it not make more sense to have a method like ref or similar that can be used instead of clone ? So, that's its explicit and clear. The ref method could just as well call clone internally. Or perhaps, new_ref. Or a name that makes more sense. Just not clone, (though that has become accepted today in the ecosystem) but the actual semantics are rather different.
Edit: Make it clear that I'm not suggesting that clone be renamed - That's neither my intent nor a solution to the issue. Just looking for potential way to mitigate this.