<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 Jan 7, 2016, at 2:56 PM, Jens Alfke via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 7, 2016, at 2:33 PM, Don Wills <<a href="mailto:don.wills@portablesoftware.com" class="">don.wills@portablesoftware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="font-family: Alegreya-Regular; font-size: 15px; font-style: normal; font-variant: 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;">Do you really believe that you can stop the "users" who "loathed them so much" from doing what they want to do with Swift? Hubris isn't a strong enough word to describe that attitude.</div></div></blockquote><div class=""><br class=""></div><div class="">It’s impossible to implement unchecked exceptions in Swift because it lacks any form of stack-unwinding. For example, if A calls B calls C, and B is not marked as ‘throws’, then there is no way for C to return an error back to A. (Unless the error is stored externally, like as an object property, instead of being directly returned.)</div><br class=""><blockquote type="cite" class=""><div class="" style="font-family: Alegreya-Regular; font-size: 15px; font-style: normal; font-variant: 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;">FWIW, I've already started down the path of dealing with the lack of unchecked <whatever-you-call-em>s by using the following code:</div></blockquote><br class=""></div><div class="">“try!” isn’t anything like an unchecked exception. It simply <i class="">ignores</i> the error. It’s the equivalent of the unfortunate Java idiom:</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>try {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>somethingThatMightThrowAnException();</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>} catch(Exception e) { /* la la la I can’t hear you */ }</div><div class="">Back in my Java days I tracked several mysterious bugs down to usage of this idiom. Internally something was failing, but the exception was ignored so there was no indication of the failure. That made it much harder for me to find.</div></div></div></blockquote><div><br class=""></div></div><div class="">FYI, try! aborts if an error is thrown. It is more analogous to:</div><div class=""><br class=""></div><div class="">try {<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>somethingThatMightThrowAnException();<br class="">} catch(Exception e) {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>abort(); // this better not happen</div><div class="">}</div><div class=""><br class=""></div><div class="">-Chris</div></body></html>