[swift-evolution] [Proposal] Use inout at function call sites

Jordan Rose jordan_rose at apple.com
Fri Jan 29 21:18:40 CST 2016

> On Jan 29, 2016, at 19:16 , Brent Royal-Gordon <brent at architechies.com> wrote:
>> P.S. At one point we thought about requiring you to declare "assignment" in your operator declaration, and disallowing inout parameters from arbitrary other operators, but that didn't actually turn into a proposal. It's not a bad idea, though—just a bit of compiler-enforced consistency.
> Are there any `inout` operators which don't have `=` at the end of their name?

Now that ++ and -- are gone, there are not any in the standard library. We do still have '!=' as an exception to the converse, though. :-) (And I've seen some operators in other libraries that don't have "=" but do mutate an argument.)


More information about the swift-evolution mailing list