<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=""><blockquote type="cite" class="">On May 6, 2016, at 2:04 AM, Adrian Zubarev via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></blockquote><div><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; 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-stroke-width: 0px; margin: 0px;" class=""><div style="margin: 0px; line-height: normal;" class="">The ugly NSError pattern could be rewritten and migrated to:</div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-family: 'helvetica Neue', helvetica;" class="">do {</span><br style="font-family: 'helvetica Neue', helvetica;" class=""><span style="font-family: 'helvetica Neue', helvetica;" class="">&nbsp; &nbsp;try something()</span><br style="font-family: 'helvetica Neue', helvetica;" class=""><span style="font-family: 'helvetica Neue', helvetica;" class="">} catch let error {</span><br style="font-family: 'helvetica Neue', helvetica;" class=""><span style="font-family: 'helvetica Neue', helvetica;" class="">&nbsp; &nbsp;handle(</span><span style="font-family: 'helvetica Neue', helvetica;" class="">error `bridge` NSError</span><span style="font-family: 'helvetica Neue', helvetica;" class="">)</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-family: 'helvetica Neue', helvetica;" class="">}</span></div><div style="margin: 0px; line-height: normal;" class=""><br class=""></div></div><span style="font-family: Helvetica, Arial; font-size: 13px; 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-stroke-width: 0px; float: none; display: inline !important;" class="">Is such a change complicated, what do you think?</span></div></blockquote></div><br class=""><div class="">I’ve made a pitch, "<font face="Helvetica Neue" class="">Consistent bridging for NSErrors at the language boundary”, which I believe would not only eliminate the need for&nbsp;“as” to contain bridging magic, but is also much less ugly than either the current pattern or the example above.</font></div><div class=""><font face="Helvetica Neue" class=""><br class=""></font></div><div class=""><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160502/016618.html" class="">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160502/016618.html</a></div><div class=""><font face="Helvetica Neue" class=""><br class=""></font></div><div class=""><font face="Helvetica Neue" class="">Charles</font></div><div class=""><font face="Helvetica Neue" class=""><br class=""></font></div></body></html>