<div dir="ltr">For what it&#39;s worth. If swift is about clarity, then guard is quite an obscure keyword.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 12, 2015 at 4:12 PM, Matthew Johnson via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I’ve written enough Ruby code to appreciate these keywords and believe they are worth adding the keywords.  I know others don’t agree and that the Swift team considered this earlier and did not add them for the exact reason you stated.  <div><br></div><div>I think it would be good to get a read on where the community stands.  I’m not sure which opinion is in the majority.<div><div class="h5"><div><br><div><blockquote type="cite"><div>On Dec 12, 2015, at 10:08 AM, Al Skipp &lt;<a href="mailto:al_skipp@fastmail.fm" target="_blank">al_skipp@fastmail.fm</a>&gt; wrote:</div><br><div><div style="word-wrap:break-word"><div><div>If at all possible I think it’s best to avoid adding keywords to the language. Instead of ‘unless&#39;, you could do: </div><div><br></div><div>public func not(bool: Bool) -&gt; Bool { return !bool }</div><div><br></div><div>if not(condition) { print(&quot;condition was false&quot;) }</div></div><div><br></div><div>Not terrible ¯\_(ツ)_/¯</div><div><br></div><div><br></div><div><div><blockquote type="cite"><div>On 12 Dec 2015, at 15:48, Matthew Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br><div><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">I’m not sure about the single line aspect of this proposal, but I am a big proponent of “unless” and “until” as complements to “if” and “while”.  They greatly improve readability over &quot;if !(expression)” and “while !(expression)” IMHO.</span><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br><div><blockquote type="cite"><div>On Dec 12, 2015, at 9:45 AM, Arthur Ariel Sabintsev via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br><div>For your specific example, I&#39;d 100% use the guard statement. It achieves the same result.<br><br>-1 from me.<br><div class="gmail_quote"><div dir="ltr">On Sat, Dec 12, 2015 at 9:43 AM J. Cheyo Jimenez via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">-1 from me.  I think I would rather have an if-then expression that would handle both False and True cases. <div><a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001944.html" target="_blank">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001944.html</a><br><div><br></div><div>Also, in most cases I feel that guard would be a better choice. <div><br></div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 12, 2015 at 5:39 AM, James Campbell via swift-evolution<span> </span><span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span><span> </span>wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I propose adding the unless and if statements from ruby.<br><br>Return false if james = nil<br><br>This returns false if the variable James is nil<br>. This line does it unless james is nil:<br><br>Return false unless james = nil<br><br>This has been really handy when working in ruby, reduces lines and pyramids of doom<br><br>Sent from my iPhone<br>_______________________________________________<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><br></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=QOj-2FXWMwrtGhHdk0ao-2FYqYPqIFSXRT0DG7Sea-2BCcxJN8c5RRhyvxdcersifGUQfEvSKA-2BcBWhD1IL2gdIk1Z0CqzR9cyYlLS6x2ISqAdFeWy8udykQsTYlY5El02WDIqpG7sRXq-2BJZwOCAxhwCrfyRgVMAG6-2FcFCyxFMDMuAC2m2vuiSL3IEmYfF1-2BnU827NC1-2FOUujQ-2B1nncjE3VhzlbBhcHN6AHbj9MPAYz-2B8du-2BQ-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0px!important;margin:0px!important;padding:0px!important"><span> </span>_______________________________________________<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><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=eLFMrKDT8iBxZ-2Fbnk-2BZqvSchNN-2FvYXdceA0T7VxwkAdRcwxCUln-2FYz-2Fh7rYWT7qE6p-2B874XipoMU74xFpMCSJydD2kD2vFmE5NVfH5Crm0CTQaIJQHSjECxlqhC8kxJzzw0RQfQSu44g6CI-2BEJvEcZ7DIg4SDzpvBdj3IEw-2BsEZBa0HpJs1Eem6Z1hJIzxa5dd-2ByS1PPj1PhhbGHWtTsuj1KGFIeTCXeikNhG8xjeKc-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0px!important;margin:0px!important;padding:0px!important"><span> </span>_______________________________________________<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" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div></blockquote></div><br></div><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=beeSmh5kY-2BJ166T9jAm-2BjJ0Ntx7b5Xyuqmzlt3vqHGTaUjtRKwW3rT8o1YB2JoulxPl8BNPHlxvImrhArn8l7cffsAcyhTXW8J6wIQN8kD6KTxy04d2mYXKIDnKA-2FTWvt4WkdZLhKFAWlgHEV6qLyLmYn-2BB9Y-2Fppz8-2Bonp6o2-2F0CN7bc4Lmx5IXboPor7pL-2Bewip48kTFHQrfT1Fl2oWntoQAW9j-2B94JKJA8nq2FWd0-3D" alt="" width="1" height="1" border="0" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;min-height:1px!important;width:1px!important;border-width:0px!important;margin:0px!important;padding:0px!important"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important"><span> </span>_______________________________________________</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">swift-evolution mailing list</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="mailto:swift-evolution@swift.org" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">swift-evolution@swift.org</a><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></div></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=xV0JY-2FdZMnUMvSFtZnLiBPRTDDOSQf3-2FpH33HYOlBxEM8Y2JcVCX5qTslHzgYHzwp4BVtRrO9XZnFFp04rnHYfhmHKiYJmKDhyP-2BmpuCXybBRKgM6pUK5tfgVmag3I1aYQfRpr2n-2FOIcCjuC7LLbX-2FQXJsV2O15fcwaG8rPjjD7X7Lwf0ltgJBwYj2IpHdcNMwGjR-2FkJdyD7bF6Emct-2FBwpIL43WjQEJhgaCf-2BUSevg-3D" alt="" width="1" height="1" border="0" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important">
</div>
<br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">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>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><span style="font-size:16px;line-height:19.2px"></span><span style="font-size:12.8px"> Wizard</span><br></div><div><a href="mailto:james@supmenow.com" target="_blank">james@supmenow.com</a></div><div>+44 7523 279 698</div></div></div></div></div></div>
</div>