[swift-evolution] Will Swift ever support optional methods without @objc?

Rick Mann rmann at latencyzero.com
Tue Nov 15 01:53:24 CST 2016

> On Nov 14, 2016, at 22:51 , Charlie Monroe via swift-evolution <swift-evolution at swift.org> wrote:
> One major example is the NS/UITableViewDataSource or Delegate - there are many many methods that you don't need to implement, hence are optional.
> But I think that this was partially solved by default implementation of protocol methods, which pretty much does what you want...

I just realized I only responded to someone else, and not the whole list. It does, but it forces me to make the return value of the protocol method optional, so that the default implementation can return nil. 

In the end, I guess that's not so bad, since I'm not happy with the entire approach, but it'll do for now.

Rick Mann
rmann at latencyzero.com

More information about the swift-evolution mailing list