What do borrowing parameters do to Copyable types?

borrowing parameters are passed similarly to C++ const T & parameters, with the difference that Swift strictly prevents mutable aliasing of the parameter for the duration of the function call. This means that small values can transparently be passed by value without indirection, and that if the argument to a function call is not mutated in the caller, then the caller can pass along its borrow without copying. As you noted, the caller may still implicitly copy if the compiler thinks it needs to.

borrowing corresponds to the default calling convention for most functions, so from a caller's perspective, it doesn't have much effect. Inside of the callee, though, the parameter has implicit copies suppressed, so uses of that parameter binding that aren't able to borrow will raise errors unless you explicitly copy the value.

7 Likes