<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 24, 2016, at 1:26 PM, Chris Lattner &lt;<a href="mailto:clattner@apple.com" class="">clattner@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 24, 2016, at 11:57 AM, Russ Bishop 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=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 24, 2016, at 10:26 AM, Alex Martini via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="section" id="allow-swift-types-to-provide-custom-objective-c-representations" style="color: rgb(51, 51, 51); font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;"><h3 style="font-size: 1.1em; font-weight: normal; color: rgb(12, 55, 98); margin-top: 30px;" class="">Allow Swift types to provide custom Objective-C representations<a class="headerlink" href="file:///Users/alexmartini/DevPubs%20Git%20Repositories/Swift%20Language%20Review/_build/html/LR_MeetingNotes/2016-03-23.html#allow-swift-types-to-provide-custom-objective-c-representations" title="Permalink to this headline" style="visibility: hidden; font-weight: bold; text-decoration: none; color: rgb(167, 206, 56); padding-left: 5px;"></a></h3><p style="text-align: justify;" class=""><a class="external reference" href="https://github.com/apple/swift-evolution/pull/198" style="font-weight: bold; text-decoration: none; color: rgb(137, 38, 1);">https://github.com/apple/swift-evolution/pull/198</a></p><p style="text-align: justify;" class="">The associated type could be&nbsp;<tt class="literal docutils" style="background-color: rgb(226, 226, 226); font-size: 1em;"><span class="pre">AnyObject</span></tt>&nbsp;rather than&nbsp;<tt class="literal docutils" style="background-color: rgb(226, 226, 226); font-size: 1em;"><span class="pre">NSObject</span></tt>. The use case for a non-subclass of&nbsp;<tt class="literal docutils" style="background-color: rgb(226, 226, 226); font-size: 1em;"><span class="pre">NSObject</span></tt>&nbsp;is very narrow, but it’s not a needed restriction.</p><p style="text-align: justify;" class="">The&nbsp;<tt class="literal docutils" style="background-color: rgb(226, 226, 226); font-size: 1em;"><span class="pre">unconditionalyBridgeFromObjectiveC</span></tt>&nbsp;function can probably go away. Calling initializers from the downcasting infrastructure is horrible. If we need a function, they</p></div></div></div></blockquote><div class="">Was there more to this line of thought? It looks like it got cut off.</div><div class=""><br class=""></div><div class="">I would like to unify this to either have the initializers or have the static functions but not both, but I don’t know which is preferred from an implementation perspective. The initializers feel more “Swifty” but moving back to static functions is perfectly workable.</div></div></div></div></blockquote><div class=""><br class=""></div>The preference was to just have the initializers, since that is the preferred way to express conversions.</div></div></div></blockquote><br class=""></div><div><br class=""></div><div>Sounds good to me; I updated the proposal to use initializers.</div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div>Russ</div><br class=""></body></html>