<div dir="ltr">Is it any more feasible to allow<div><br></div><div>    let sel: Selector = UIView.insertSubview(_:belowSubview:)</div><div><br></div><div>than it is to allow</div><div><br></div><div>    let sel = Selector(UIView.insertSubview(_:belowSubview:))</div><div><br></div><div>?</div><div class="gmail_extra">
<br><div class="gmail_quote">On Tue, Jan 19, 2016 at 2:50 PM, Joe Groff via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</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><span class=""><blockquote type="cite"><div>On Jan 19, 2016, at 2:46 PM, David Hart &lt;<a href="mailto:david@hartbit.com" target="_blank">david@hartbit.com</a>&gt; wrote:</div><br><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>David.<br></div></div></div></blockquote><div><br></div></span><div>There&#39;s some compiler magic necessary no matter what, since it isn&#39;t otherwise possible to go from a function reference to a name within the language. Selector itself will remain printable AFAIK (however, the way it prints will become somewhat misleading to Swift code, as the Swift mapping of APIs diverges from ObjC). We&#39;ll likely want to phase out its StringLiteralConvertible-ness, though.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Joe</div></font></span><div><div class="h5"><br><blockquote type="cite"><div><div style="word-wrap:break-word"><div><div><br><div><blockquote type="cite"><div>On 19 Jan 2016, at 23:43, Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; 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 &#39;Selector(Type.method)&#39; syntax. Producing the selector is something that can&#39;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&#39;t have members to ascribe special behavior to &#39;Type.method.objcSelector&#39;, 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 &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; 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></div></div><br></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>