Good point. That would obviously restrict the choice for naming the methods in 
such a protocol, but since we are talking about new protocols that would not be 
an impediment. It might result in non-optimal method names, of course.

-Thorsten 

> Am 31.03.2016 um 18:37 schrieb Rob Mayoff via swift-evolution 
> <[email protected]>:
> 
>> On Thu, Mar 31, 2016 at 10:56 AM, Thorsten Seitz via swift-evolution 
>> <[email protected]> wrote:
> 
>> 
>> protocol UIGestureRecognizerDelegate {
>>     var gestureRecognizerShouldBegin: ((gestureRecognizer: 
>> UIGestureRecognizer) -> Bool)? { get }
>> }
> 
> UIGestureRecognizerDelegate has five methods that are "named" 
> gestureRecognizer:
> 
> gestureRecognizer(_:shouldRecognizeSimultaneouslyWithGestureRecognizer:)
> gestureRecognizer(_:shouldRequireFailureOfGestureRecognizer:)
> gestureRecognizer(_:shouldBeRequiredToFailByGestureRecognizer:)
> gestureRecognizer(_:shouldReceiveTouch:)
> gestureRecognizer(_:shouldReceivePress:)
> You can only have a single property named "gestureRecognizer", so you either 
> have to come up with other names for these, or change the language to allow 
> closure-typed properties to have multipart names.
> 
> This problem has been noted before, for example here: 
> http://article.gmane.org/gmane.comp.lang.swift.evolution/8707/
> 
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to