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

Russ Bishop xenadu at gmail.com
Thu Jan 7 00:26:43 CST 2016

I agree, we don’t need anything special for this. Let a function reference decay into a selector where appropriate.

For that matter I want properties and subscripts to decay into getter/setter function references in contextually appropriate places as well, but haven’t proposed it yet.


> On Dec 27, 2015, at 10:07 AM, Joe Groff via swift-evolution <swift-evolution at swift.org> wrote:
> Selectors can be seen as "just" a kind of function value. Do we need a new syntax form at all? We ought to be able to turn an unbound function reference like UIView.insertSubview into a selector reference in Selector type context, or maybe a typed @convention(selector) function as discussed in another thread, without any explicit get-a-selector operation.
> -Joe
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160106/3b532e94/attachment.html>

More information about the swift-evolution mailing list