Pitch: `borrow` and `inout` declaration keywords

Indeed. I was in the middle of posting this...

What we really have in Swift are styles of variable bindings. They need to be written in type position sometimes because they affect calling convention.

We want to introduce new bindings that have the same semantics as noncopyable types (except that you can explicitly "copy" them).

Implicitly copying bindings: let/var/inout

Noncopying bindings: borrow/consume/mutate

1 Like