<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="">I think I understand Yarden. I did some C# recently, which does not have *implicit* switch case fall-through and forces you to end all switch case bodies with break (for clarity I guess). It felt redundant coming from Swift. I understand why Adrian would feel the same way about void-return statements in guard. I don’t know, I’m a bit undecided on this issue. If we imagine this proposal, the fact that it only works on void-returning functions feels a bit weird.<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 20 Jun 2016, at 18:08, 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="">On the contrary, having a compiler error for a guard body that doesn't exit the scope is the very point of having guard.<br class=""><br class="">The links were for your review because the discussion on this idea has been extensive and both times reached consensus that this is not a workable idea.<br class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Jun 20, 2016 at 09:12 Yarden Eitan via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></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" class=""><div style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class="">Adrian: I would prefer to not have it at all. But this is a better alternative than a brand new line declaring a return, and nothing else. This is inline and part of the ‘guard’ declaration (better context), and definitely better than having a warning stay in your codebase.&nbsp;</div><div style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class=""><br class=""></div><div style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class="">Putting the code clarity aside, having a compiler error for a non-returned guard seems like an overkill, and different that the other Swift implementations (such as Switch that doesn’t need a break to not fall through).</div> <div class=""><br class=""></div><div class="">Xiaodi: Thank you for the links. Was an actual proposal ever formed for this, or was it decided not to move forward?</div></div><div style="word-wrap:break-word" class=""><div class=""><br class=""></div>Yarden</div><div style="word-wrap:break-word" class=""><br class=""> <div class=""><div style="font-family:helvetica,arial;font-size:13px" class=""><br class=""></div></div> <br class=""><p class="">On June 20, 2016 at 1:33:54 AM, Adrian Zubarev via swift-evolution (<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>) wrote:</p> <blockquote type="cite" class=""><span class=""><div style="word-wrap:break-word" class=""><div class=""></div><div class="">








<div class="">
<blockquote class=""><p class="">@implicitreturn guard a = b else { print(“foo”) }</p>
</blockquote><p class="">Isn’t that just the same? I mean now you even write more
boilerplate then bebore.</p><p class="">How does your return type look, what are you trying to
solve?</p>
</div>
<div class="">

<div style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;" class="">
<br class=""></div>
<br class="">
<div class="">
<div style="font-family:helvetica,arial;font-size:13px" class="">
--&nbsp;<br class="">
Adrian Zubarev<br class="">
Sent with Airmail</div>
</div>
<br class=""><p class="">Am 20. Juni 2016 um 08:30:39, Yarden Eitan
via swift-evolution (<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>)
schrieb:</p>
<blockquote type="cite" class="">
<div class=""><span class=""><span style="font-family: 'helvetica Neue', helvetica; font-size: 14px; font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; background-color: rgb(255, 255, 255); float: none; display: inline !important;" class="">
@implicitreturn guard a = b else { print(“foo”) }<span class="">&nbsp;</span></span></span></div>
</blockquote>
</div>
<div class=""></div>


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