<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">What was the discussed design?<div class=""><br class=""></div><div class="">It seems to me that if Swift has a CustomSelectorLiteralConvertible protocol that had a required init(selectorLiteral: String) method, it shouldn't be heroically difficult to disambiguate between a string and a method reference.<br class=""><div class=""><div class="">
<br class="Apple-interchange-newline"><span style="color: rgb(0, 0, 0); font-family: 'Lucida Grande'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; display: inline !important; float: none;" class="">Félix</span>
</div>

<br class=""><div><blockquote type="cite" class=""><div class="">Le 19 janv. 2016 à 18:01:11, Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><blockquote type="cite" class="">On Jan 19, 2016, at 2:56 PM, Jacob Bandes-Storch &lt;<a href="mailto:jtbandes@gmail.com" class="">jtbandes@gmail.com</a>&gt; wrote:<br class=""><br class="">Is it any more feasible to allow<br class=""><br class=""> &nbsp;&nbsp;&nbsp;let sel: Selector = UIView.insertSubview(_:belowSubview:)<br class=""><br class="">than it is to allow<br class=""><br class=""> &nbsp;&nbsp;&nbsp;let sel = Selector(UIView.insertSubview(_:belowSubview:))<br class=""><br class="">?<br class=""></blockquote><br class="">It is in fact somewhat easier; we do similar things for things like block and C function pointer conversions, where we allow an implicit conversion but then do a pass to see whether the thing we reference makes sense to reference as a function pointer. However, Doug balked at making this an implicit conversion, due to the ObjC-specificness and relative rarity of selectors. Implicit conversions tend to have hard-to-predict secondary costs.<br class=""><br class="">-Joe<br class=""><br class="">_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></div></blockquote></div><br class=""></div></div></body></html>