> On Aug 5, 2015, at 9:48 PM, Rick Mann <[email protected]> wrote:
> 
>> 
>> On Aug 5, 2015, at 17:40 , Charles Srstka <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> On Aug 5, 2015, at 7:21 PM, Rick Mann <[email protected] 
>> <mailto:[email protected]>> wrote:
>>> 
>>> Would it make sense for Swift to just let you add method implementations to 
>>> protocols (perhaps as a shortcut to the protocol-extension technique you 
>>> used)?
>> 
>> That’s what a protocol extension *is*.
> 
> No, I meant syntactically to the protocol. I'm not saying get rid of protocol 
> extensions, but why not be able to also do this?
> 
> protocol MyProtocol {
>    func myFunc()
>    {
>        some stuff
>    }
> }
> 
> This should be equivalent to
> 
> protocol MyProtocol {
> }
> 
> extension MyProtocol {
>    func myFunc()
>    {
>        some stuff
>    }
> }

Ah, sorry I misunderstood. Yeah, this does seem to be a bit of a no-brainer.

Charles

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to