<div dir="ltr">I'm fine with objc_selector(x.foo) or @selector(x.foo). x.foo.selector is cute, but wouldn't this clash with property getters/setters?<br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Jacob<br></div></div></div></div>
<br><div class="gmail_quote">On Tue, Jan 19, 2016 at 4:21 PM, Douglas Gregor via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><span class=""><div>On Jan 19, 2016, at 2:46 PM, David Hart <<a href="mailto:david@hartbit.com" target="_blank">david@hartbit.com</a>> wrote:</div><br></span><span class=""><div><div style="word-wrap:break-word">What effect would that have? Would the options still return a type (Selector) that is CustomStringConvertible or would it just be compiler magic?</div></div></span></blockquote><div><br></div><div>Either way, we’ll return a Selector. The concern about “Selector(x.foo)” is that we would need special, ad hoc overload-resolution rules to decide between this magic syntax and other initializers of Selector. Making it a separate expression (“objc_selector(x.foo)”) or a special property on values of function type (“x.foo.selector”) eliminate that issue.</div><div><br></div><div>We’d love to hear everyone’s thoughts on those approaches.</div><div><br></div><span style="white-space:pre-wrap">        </span>- Doug</div><div><div class="h5"><div><br><blockquote type="cite"><div><div style="word-wrap:break-word"><div>David.<br><div><br><div><blockquote type="cite"><div>On 19 Jan 2016, at 23:43, Joe Groff via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:</div><br><div><div style="word-wrap:break-word">We discussed this proposal during our core team review meeting, and concerns were raised about the implementability of the proposed 'Selector(Type.method)' syntax. Producing the selector is something that can't quite be modeled as a real initializer, so the type checker would have to perform heroics to disambiguate a selector literal reference from a proper initializer call. We recommend reconsidering alternative syntactic forms for referencing the selector. Potential options include:<div><br></div><div>- A unique prefix identifier, such as `objc_selector(Type.method)`, as you had originally proposed, or</div><div>- Taking advantage of the fact that functions don't have members to ascribe special behavior to 'Type.method.objcSelector', or something like it.</div><div><br></div><div>-Joe</div><div><br><div><blockquote type="cite"><div>On Jan 18, 2016, at 8:02 AM, Joe Groff via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>> wrote:</div><br><div><div style="word-wrap:break-word"><p style="word-wrap:break-word;margin:1.3125em 0px;line-height:1.3125em"><font color="#111111" face="Helvetica Neue, Helvetica, Arial, Verdana, sans-serif"><span style="font-size:14px">Hello Swift community,<br><br>The review of “Referencing the Objective-C selector of a method” begins now and runs through January 23, 2016. The proposal is available here:<br><br><span style="white-space:pre-wrap">        </span><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0022-objc-selectors.md" target="_blank">https://github.com/apple/swift-evolution/blob/master/proposals/0022-objc-selectors.md</a><br><br>Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at<br><br><span style="white-space:pre-wrap">        </span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br><br>or, if you would like to keep your feedback private, directly to the review manager.<br><br><b>What goes into a review?<br></b><br>The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction of Swift. When writing your review, here are some questions you might want to answer in your review:<br><br></span></font></p><div><font color="#111111" face="Helvetica Neue, Helvetica, Arial, Verdana, sans-serif"><span style="font-size:14px"><span style="white-space:pre-wrap">        </span>• What is your evaluation of the proposal?<br></span></font></div><div><font color="#111111" face="Helvetica Neue, Helvetica, Arial, Verdana, sans-serif"><span style="font-size:14px"><span style="white-space:pre-wrap">        </span>• Is the problem being addressed significant enough to warrant a change to Swift?<br></span></font></div><div><font color="#111111" face="Helvetica Neue, Helvetica, Arial, Verdana, sans-serif"><span style="font-size:14px"><span style="white-space:pre-wrap">        </span>• Does this proposal fit well with the feel and direction of Swift?<br></span></font></div><div><font color="#111111" face="Helvetica Neue, Helvetica, Arial, Verdana, sans-serif"><span style="font-size:14px"><span style="white-space:pre-wrap">        </span>• If you have you used other languages or libraries with a similar feature, how do you feel that this proposal compares to those?<br></span></font></div><div><font color="#111111" face="Helvetica Neue, Helvetica, Arial, Verdana, sans-serif"><span style="font-size:14px"><span style="white-space:pre-wrap">        </span>• How much effort did you put into your review? A glance, a quick reading, or an in-depth study?<br></span></font></div><p style="word-wrap:break-word;margin:1.3125em 0px;line-height:1.3125em"><font color="#111111" face="Helvetica Neue, Helvetica, Arial, Verdana, sans-serif"><span style="font-size:14px">More information about the Swift evolution process is available at<br><br><span style="white-space:pre-wrap">        </span><a href="https://github.com/apple/swift-evolution/blob/master/process.md" target="_blank">https://github.com/apple/swift-evolution/blob/master/process.md</a><br><br>Thank you,<br><br>-Joe<br><br>Review Manager</span></font></p></div>_______________________________________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div></blockquote></div><br></div></div>_______________________________________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div></div></div><br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br></div></div>