I'm a hard no on this one, at least the way this is currently worded. There are several (not) so subtle differences between anonymous functions (closures in Swift terminology) and methods. Probably the most important is methods get an implicit self parameter while anonymous functions do not. If we start injecting self into anonymous functions that just happen to be properties, it's not an anonymous function anymore, it's a method with a different syntax. We'd also have to change the way anonymous function properties work. IIRC they only get self if the property is lazy.
So is what you're really asking for the ability for anonymous function properties to satisfy protocol method requirements? Because I really don't see the benefit of that vs just using actual methods. The way I look at it it's just a less elegant way of defining a method.
I provided few examples of situations where you cannot use actual methods. In these cases you cannot write a normal method, because each instance does something different, even though they are of the same type. You can solve each of these problems in other ways, but not by "just writing a method"
I don't think your examples do a good job of explaining your use case.
Okay I see where you're coming from now I think, and I think this is actually a bad idea. This is bringing in complexity where just implementing the requirement as a method that just calls your closure accomplishes the same thing. Trying to bring this kind of feature in raises a lot more questions about how exactly this would be implemented.
Anyone willing to push this forward, feel free to take over the pitch (leave the optional keyword I talk about aside, that's a different story). Compound names + sugar can't happen faster. Its inclusion in Swift 5 would be amazing.
Yeah, being able to give variables of closure type names with argument labels is a long-overdue feature we promised back when we took argument labels out of function types. I'm personally in favor of allowing protocol conformance to be satisfied by anything that fits a general syntactic requirement that x.methodName(...) works. Our current protocol witness matching is too strict.