<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 Feb 17, 2017, at 1:24 PM, Xiaodi Wu 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 dir="ltr" class="">Let's not bring bikeshedding the commonly proposed and rejected union spelling into this.<div class="">Typed throws would be a nice addition, assuming that the core team finds it in scope for phase 2. It seems only logical that any type can be thrown (i.e. conforms to Error) should be permitted to be listed in `throws()`.<br class=""></div></div></div></blockquote><div><br class=""></div><div>Agree. &nbsp;Typed throws should have a single thrown type. &nbsp;Making it more convenient to throw and catch more than one error type with typed throws without having to manually create a wrapper is an orthogonal issue. &nbsp;David Owens convinced me of this last year when we had a thread on the topic.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Feb 17, 2017 at 1:18 PM, Adrian Zubarev via swift-evolution <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="m_1653627348615050552bloop_markdown"><p class="">That’s what I thought too. That’s also the case I showed a simple example how we could solve the giant list with a typealias even if the pipe <code class="">|</code> operator would be exclusive for anything that conforms to <code class="">Error</code>.</p><div class=""><br class="webkit-block-placeholder"></div></div><div class="m_1653627348615050552bloop_original_html"><span class=""><div id="m_1653627348615050552bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class=""><br class=""></div> <br class=""> <div id="m_1653627348615050552bloop_sign_1487359011504078848" class="m_1653627348615050552bloop_sign"><div style="font-family:helvetica,arial;font-size:13px" class="">--&nbsp;<br class="">Adrian Zubarev<br class="">Sent with Airmail</div></div> <br class=""></span><div class=""><div class="h5"><p class="m_1653627348615050552airmail_on">Am 17. Februar 2017 um 20:16:30, Anton Zhilin (<a href="mailto:antonyzhilin@gmail.com" target="_blank" class="">antonyzhilin@gmail.com</a>) schrieb:</p> <blockquote type="cite" class="m_1653627348615050552clean_bq"><span class=""><div class=""><div class=""></div><div class="">





<div dir="ltr" class="">
<div class="m_1653627348615050552markdown-here-wrapper"><p style="margin:0px 0px 1.2em!important" class="">2017-02-17 22:12
GMT+03:00 Adrian Zubarev via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;:</p><div style="margin: 0px 0px 1.2em !important;" class=""><br class="webkit-block-placeholder"></div>
<div class="m_1653627348615050552markdown-here-exclude">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class="">
<div class="m_1653627348615050552m_7486315314052609371bloop_markdown"><p class="">Is the throwing type always a protocol? In your example it is,
but is this going to be always the case?</p>
</div>
</div>
</blockquote>
</div><div style="margin: 0px 0px 1.2em !important;" class=""><br class="webkit-block-placeholder"></div><p style="margin:0px 0px 1.2em!important" class="">I thought it was going to
be any one subtype of <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline" class="">
Error</code>, be it a struct, an enum, or a protocol existential,
or <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline" class="">
Error</code> itself.</p>
<div title="MDH:PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPjxkaXYgY2xhc3M9ImdtYWlsX3F1b3RlIj4yMDE3LTAy LTE3IDIyOjEyIEdNVCswMzowMCBBZHJpYW4gWnViYXJldiB2aWEgc3dpZnQtZXZvbHV0aW9uIDxz cGFuIGRpcj0ibHRyIj4mbHQ7PGEgaHJlZj0ibWFpbHRvOnN3aWZ0LWV2b2x1dGlvbkBzd2lmdC5v cmciIHRhcmdldD0iX2JsYW5rIj5zd2lmdC1ldm9sdXRpb25Ac3dpZnQub3JnPC9hPiZndDs8L3Nw YW4+Ojxicj48YmxvY2txdW90ZSBjbGFzcz0iZ21haWxfcXVvdGUiIHN0eWxlPSJtYXJnaW46MCAw IDAgLjhleDtib3JkZXItbGVmdDoxcHggI2NjYyBzb2xpZDtwYWRkaW5nLWxlZnQ6MWV4Ij48ZGl2 IHN0eWxlPSJ3b3JkLXdyYXA6YnJlYWstd29yZCI+PGRpdiBjbGFzcz0ibV83NDg2MzE1MzE0MDUy NjA5MzcxYmxvb3BfbWFya2Rvd24iPjxwPklzIHRoZSB0aHJvd2luZyB0eXBlIGFsd2F5cyBhIHBy b3RvY29sPyBJbiB5b3VyIGV4YW1wbGUgaXQgaXMsIGJ1dCBpcyB0aGlzIGdvaW5nIHRvIGJlIGFs d2F5cyB0aGUgY2FzZT88L3A+PC9kaXY+PC9kaXY+PC9ibG9ja3F1b3RlPjxkaXY+SSB0aG91Z2h0 IGl0IHdhcyBnb2luZyB0byBiZSBhbnkgb25lIHN1YnR5cGUgb2YgYEVycm9yYCwgYmUgaXQgYSBz dHJ1Y3QsIGFuIGVudW0sIG9yIGEgcHJvdG9jb2wgZXhpc3RlbnRpYWwsIG9yIGBFcnJvcmAgaXRz ZWxmLjwvZGl2PjwvZGl2PjwvZGl2Pg==" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0" class="">
​</div>
</div>
</div>


</div></div></span></blockquote></div></div></div><div class="m_1653627348615050552bloop_markdown"><div class=""><br class="webkit-block-placeholder"></div></div></div><br class="">______________________________<wbr class="">_________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/<wbr class="">mailman/listinfo/swift-<wbr class="">evolution</a><br class="">
<br class=""></blockquote></div><br class=""></div></div></div></div>
_______________________________________________<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></blockquote></div><br class=""></body></html>