[swift-evolution] [Proposal] Make optional protocol methods first class citizens
glessard at tffenterprises.com
Thu Mar 31 23:42:37 CDT 2016
> On 31 mars 2016, at 22:01, Chris Lattner via swift-evolution <swift-evolution at swift.org> wrote:
> Protocol requirements with default (no-op) implementations already satisfy that design goal, no?
They do, but that is not clear for everyone. And after protocol extensions appeared with 2.0, it took a little while to make that leap...
Documentation-wise, maybe the current “Optional Protocol Requirements” section should be moved from “The Swift Programming Language” to “Using Swift with Cocoa and Objective-C”. It would make it clearer that the feature exists for Objective-C interop. At the very least, moving that section to after the “Protocol Extensions" section would at least present the more important feature first.
More information about the swift-evolution