<div dir="ltr">I think the core team has previously mentioned some positive notions about typed throws, so it'd be interesting to hear what they have in mind at this point (or, more likely, at the point when they're no longer swamped with getting Swift 3 out the door).<div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 26, 2016 at 11:55 AM, Rod Brown via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class=""><div><blockquote type="cite"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><blockquote type="cite"><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 26, 2016 at 5:43 PM, Rod Brown via swift-evolution<span> </span><span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-<wbr>evolution@swift.org</a>></span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div>(resent for Swift Evolution)</div><div><br></div><div>I’m a big fan of this idea. Currently “throws” seems like a very limited API - you know it’s throwing out something, but you can only hope to guess what that is or create fallbacks. Definitely a big +1 from me. A fallback for compatibility could be “throws” assumes “throws Any” and can be a warning?</div></div></div></blockquote></div></div></div></blockquote><div><br></div><div>I’d suggest a bare `throws` = `throws ErrorType` (you can only throw ErrorType, right?) and be valid, I don’t see any reason to make it a warning (plus that keeps source compatibility). </div></div></div></div></blockquote></div><br><div><br></div></span><div>*hits head on desk*</div><div><br></div><div>How could I miss that? `throws` = `throws ErrorType` makes perfect sense. It also means we can get some type safety, but it’s not lock in.</div><div><br></div><div>Thanks :)</div><div><br></div><div>-Rod</div></div><br>______________________________<wbr>_________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
<br></blockquote></div><br></div></div>