<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div></div><div><br></div><div><br>On Nov 11, 2017, at 10:04 AM, Chris Lattner &lt;<a href="mailto:sabre@nondot.org">sabre@nondot.org</a>&gt; wrote:<br><br></div><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 11, 2017, at 6:29 AM, Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="Singleton"><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">below the fold as far as the rest of the language is concerned. You could just as well written what the importer synths up in Swift directly:<br class=""><br class="">func foo(bar: String) {<br class="">unsafeBitCast(objc_msgSend, to: @convention(c) (AnyObject, Selector, NSString) -&gt; ().self)(self, "fooWithBar:", NSString(bar))<br class="">}<br class=""><br class="">and the rest of the language would be none the wiser.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Though, since you bring up objc_msgSend, the way it works in ObjC might be a better fit for Swift's name lookup model, since their keyword argument models are similar. If Swift had a 'method of last resort' like ObjC's</span></div></div></blockquote></div><br class=""><div class="">In fact, this is the subject of the next proposal that I will write up when I have time.</div></blockquote><br><div>It seems to me like a dynamic method-of-last-resort feature would subsume this proposal. Out of curiosity, why would we need both?</div><div><br></div><div>-Joe</div></body></html>