[swift-evolution] [Review] SE-0022: Referencing the Objective-C selector of a method

Chris Lattner clattner at apple.com
Thu Jan 21 23:04:45 CST 2016

> On Jan 21, 2016, at 4:13 PM, Jordan Rose via swift-evolution <swift-evolution at swift.org> wrote:
>>> I think that #selector is workable and fits into the model - it would be simple to implement and not cause unnecessary complexity in the implementation.
>>> That said, I’m in favor of x.selector, or #selector(x).  The former seems more syntactically elegant if it is practical.
>> The latter gives us easy extensions like
>> 	#selector(getter: MyType.property)
>> 	#selector(setter: MyType.property)
>> #selector is sorta growing on me.
> +1 from me. At this point in Swift's evolution, the # feels like "invoke compiler substitution logic here”.

I agree.  Along those lines, we could consider renaming __LINE__ and friends to #LINE

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160121/fc3684dd/attachment.html>

More information about the swift-evolution mailing list