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

Chris Lattner clattner at apple.com
Wed Jan 20 21:39:47 CST 2016

> On Jan 20, 2016, at 3:48 PM, Douglas Gregor via swift-evolution <swift-evolution at swift.org> wrote:
>> On Jan 19, 2016, at 4:52 PM, Douglas Gregor via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>> On Jan 19, 2016, at 4:40 PM, Jacob Bandes-Storch <jtbandes at gmail.com <mailto:jtbandes at gmail.com>> wrote:
>>> Is there a well-defined meaning for `#` ?
>> Not yet.
>>> What about #selector(x)?
>> Objective-C selector formation is a *very* narrow feature to consider stealing one of our few underused sigils.
> Actually, this isn’t that much different from “#available”, in the sense that it’s a special, compiler-supported expression type for which we don’t want to necessarily steal a keyword. What do others think about “#selector”?

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.


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

More information about the swift-evolution mailing list