> On Dec 21, 2015, at 10:52 AM, Joe Groff <jgr...@apple.com> wrote:
> 
>> 
>> -1
>> 
>> “inout” is intended to communicate (or at least hint at) the copy-in / 
>> copy-out behavior of the argument.  It is also there to enable other 
>> parameter modifiers, which can enable other more advanced parameters models 
>> in the future (e.g. rust-style borrowing).
> 
> If we added those kinds of knobs, they'd almost certainly be @attributes IMO. 
> A borrow model isn't really a core interface change the way `inout` is; it's 
> a set of additional restrictions on use that let the compiler avoid unwanted 
> retaining and copying.

It depends on the details of the design.  If something is currently borrowed 
“mut” then it can’t be used by anyone else. I’d want that “borrowing” action to 
be explicit in the code.

-Chris
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to