Re: Swift enums and NSNotificationCenter
Re: Swift enums and NSNotificationCenter
- Subject: Re: Swift enums and NSNotificationCenter
- From: Rick Mann <email@hidden>
- Date: Wed, 05 Aug 2015 19:48:47 -0700
> On Aug 5, 2015, at 17:40 , Charles Srstka <email@hidden> wrote:
>
> On Aug 5, 2015, at 7:21 PM, Rick Mann <email@hidden> 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
}
}
--
Rick Mann
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden