Selective Selector Mapping
It turns that adding that protocol conformance onto my class declaration not only gains me Swift’s protocol type checking, but changes the way key functions are mapped from Swift to Objective-C:
class MyDataSource: NSObject, NSTableViewDataSource { func numberOfRows(in tableView: NSTableView) -> Int { return 0 } } let thisSource = MyDataSource() thisSource.responds(to: Selector("numberOfRowsInTableView:")) // trueArmed with the knowledge that my class intends to comply with
NSTableViewDataSource
, Swift generates the expected mapping to Objective-C.