[swift-evolution] [Idea] Expression to retrieve the Objective-C selector of a method

Rob Mayoff mayoff at dqd.com
Sun Dec 27 12:00:44 CST 2015

Great idea, but why make it a free function instead of a Selector

    let sel1 = Selector(UIView.`insertSubview(_:at:)`)
    let sel2 = Selector(UIView.`frame.get`)

Of course if there were such a thing as
GeneralizedFunctionNameLiteralConvertible, we could get a “free” conversion
to Selector:

    control.sendAction(MyTarget.`doSomething(_:)`, to: target, forEvent:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151227/ca99bff5/attachment.html>

More information about the swift-evolution mailing list