<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 10:45 AM, Anton Zhilin via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important" class="">Now this is on-topic, I guess.<br class="">Last time we stopped at John McCall’s syntax:</p>
<pre style="font-family:Consolas,Inconsolata,Courier,monospace;line-height:1.2em;margin:1.2em 0px" class=""><code style="font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;background-color:rgb(248,248,248);white-space:pre;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important" class="">extension MyError: Error { ... }
func foo() throws(MyError) -> MyResult<span style="font-size:0.85em" class="">
</span></code></pre><p style="margin:0px 0px 1.2em!important" class="">It’s conservative and prevents visual ambiguity with extra parentheses.</p><p style="margin:0px 0px 1.2em!important" class="">If we (somewhat) agree on this, then submitting a proposal will be trivial.</p>
</div></div></div></blockquote></div>That mostly works for me. I’m a bit hesitant because I’m not sure how well that syntax would scale (if there are multiple types of errors that could be thrown). If the consensus is that such a scenario isn’t likely to be a problem in practice, then +1<div class=""><br class=""></div><div class="">- Dave Sweeris</div></body></html>