<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=""><div class="">&gt; "<span style="white-space: pre-wrap;" class=""> a vision of a little guard standing at his guard post checking papers"</span></div><div class=""><span style="white-space: pre-wrap;" class=""><br class=""></span></div>Raises hand. Me too. I like my little guard.<div class=""><br class=""></div><div class="">On the other hand, I'd love if assert/precondition would be combined into a single call, with an optional `forReleaseBuild:` arg (better named) that defaults to false.<br class=""><div class=""><br class=""></div><div class="">-- E</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Feb 22, 2016, at 10:07 AM, Shawn Erickson 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=""><div style="white-space:pre-wrap" class="">Ensure(TM) ...has a little much sugar for my wants in a drink<br class=""><br class="">I get and like the suggestion from a grammar pov however guard is a little more forceful in terminology which aligns with the fact that you cannot proceed past the guard unless the condition is met. (I have a vision of a little guard standing at his guard post checking papers)<br class=""><br class="">-Shawn</div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Feb 22, 2016 at 9:01 AM John Flanagan 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="">The functionality of ‘guard’ is great and this proposal has nothing to do with changing that. The only suggestion is that the word ‘ensure’ would better communicate what a ‘guard’ statement does to those encountering it for the first time and would make code more readable in general.<div class=""><br class=""></div><div class="">Example:</div><div class=""><br class=""></div><div class=""><font face="Courier" class="">ensure foo != nil else {</font></div><div class=""><font face="Courier" class="">&nbsp; &nbsp;return;</font></div><div class=""><font face="Courier" class="">}</font></div><div class=""><br class=""></div><div class="">-John</div></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></div></body></html>