Some prior, probably not as well thought-through, discussion on this topic: <a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160229/011446.html">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160229/011446.html</a><br><div class="gmail_quote"><div dir="ltr">On Wed, Jul 5, 2017 at 10:40 AM Soroush Khanlou via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I’d like to propose a guard/catch construct to the language. It would allow code to use throwing functions and handle errors fully, without straying from a happy path. do/catch can be a bit heavy-handed sometimes, and it would be nice to be able to handle throwing functions without committing to all the nesting and ceremony of do/catch.</div><div><br></div><div>Full proposal, which discusses all the corner cases and alternatives:</div><div><a href="https://gist.github.com/khanlou/8bd9c6f46e2b3d94f0e9f037c775f5b9" target="_blank">https://gist.github.com/khanlou/8bd9c6f46e2b3d94f0e9f037c775f5b9</a></div><div><br></div><div>Looking forward to feedback!</div><div><br></div><div>Soroush</div></div>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</blockquote></div>