<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><blockquote type="cite" class="">On Nov 10, 2017, at 5:51 PM, Joe Groff <<a href="mailto:jgroff@apple.com" class="">jgroff@apple.com</a>> wrote:<br class=""></blockquote><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><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=""><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=""><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="">On Nov 10, 2017, at 3:45 PM, Charles Srstka <<a href="mailto:cocoadev@charlessoft.com" class="">cocoadev@charlessoft.com</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">On Nov 10, 2017, at 5:36 PM, Joe Groff <<a href="mailto:jgroff@apple.com" class="">jgroff@apple.com</a>> wrote:<br class=""><br class="">How `MyObject.foo(_:bar:)` gets implemented is its own business, as far as the compiler is concerned. The compile-time name resolution for the method isn't impacted.<br class=""><br class="">-Joe<br class=""></blockquote><br class="">The compile-time name resolution for the method doesn’t happen *at all.*<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="">You declared the method in your @interface, and the compiler saw that and brought it in as what Swift considers to be a regular method, and your call on the Swift side was resolved to it by Swift's usual lookup rules. To do what Chris is suggesting requires changing the way calls get resolved in the compiler before the call is even formed.</span></div></blockquote></div><br class=""><div class="">The only thing that makes this the “usual lookup rules” is that the Objective-C bridge has already been implemented. Consider scenario in which the Objective-C bridge does not exist, and someone is proposing it. As I see it, all these objections will apply to it just the same.</div><div class=""><br class=""></div><div class="">For the following method:</div><div class=""><br class=""></div><div class=""><span style="color: rgb(186, 45, 162); font-family: Menlo; font-size: 14px; background-color: rgb(255, 255, 255);" class="">@objc</span><span style="font-family: Menlo; font-size: 14px; background-color: rgb(255, 255, 255);" class=""> </span><span style="color: rgb(186, 45, 162); font-family: Menlo; font-size: 14px; background-color: rgb(255, 255, 255);" class="">dynamic</span><span style="font-family: Menlo; font-size: 14px; background-color: rgb(255, 255, 255);" class=""> </span><span style="color: rgb(186, 45, 162); font-family: Menlo; font-size: 14px; background-color: rgb(255, 255, 255);" class="">func</span><span style="font-family: Menlo; font-size: 14px; background-color: rgb(255, 255, 255);" class=""> foo(bar: </span><span style="font-family: Menlo; font-size: 14px; background-color: rgb(255, 255, 255); color: rgb(112, 61, 170);" class="">String</span><span style="font-family: Menlo; font-size: 14px; background-color: rgb(255, 255, 255);" class="">)</span></div><div class=""><span style="font-family: Menlo; font-size: 14px; background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class="">- It’s changing the compile-time name resolution! The Swift name is foo(bar:), but it’s changing that to fooWithBar:!</div><div class=""><br class=""></div><div class="">- It’s changing the signature! The argument took a String, but now it’s passing an NSString!</div><div class=""><br class=""></div><div class="">- It’s not resolving the method at compile-time! It’s passing the modified method name and the arg list to some objc_msgSend() function, which resolves it dynamically in a way that user code can intercept and interpret at runtime!</div><div class=""><br class=""></div><div class="">I’m just not seeing the conceptual difference here.</div><div class=""><br class=""></div><div class="">Charles</div><div class=""><br class=""></div></body></html>