<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"><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=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class=""><div class=""><font color="#000000" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>• What is your evaluation of the proposal?<br class=""></span></font></div></div></blockquote><div class=""><br class=""></div><div class="">Mixed. But I think it leans towards the negative.&nbsp;</div><div class=""><br class=""></div><div class=""><div class="">At first I thought it was a big improvement, but after looking at how our team currently writes guard statements, the where clause is almost always using the unwrapped value (as opposed to an arbitrary boolean condition). The way we’ve been using it makes it feels like the optional unwrapping and the where clause belongs together, and I find that the where keyword is easy to skim for at the end of the line to look for other criteria on the unwrapped value.</div><div class=""><br class=""></div><div class="">Also, in most of our cases (although that may be because of the current syntax) there is only one where clause and no further unwrapping after that. In such cases, I find the current syntax very readable. More so than I find the semicolon syntax.&nbsp;</div><div class=""><br class=""></div><div class=""><pre class="" style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; margin-top: 0px; margin-bottom: 0px; line-height: 1.45; word-wrap: normal; padding: 16px; overflow: auto; background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-break: normal;"><span class="pl-k" style="color: rgb(167, 29, 93); box-sizing: border-box;">guard</span><font color="#333333" class=""> </font><span class="pl-k" style="color: rgb(167, 29, 93); box-sizing: border-box;">let</span><font color="#333333" class=""> x </font><span class="pl-k" style="color: rgb(167, 29, 93); box-sizing: border-box;">=</span><font color="#333333" class=""> </font>someOptional<font color="#333333" class=""> </font><span class="pl-k" style="color: rgb(167, 29, 93); box-sizing: border-box;">where</span><font color="#333333" class=""> x </font><font color="#a71d5d" class="">&gt;</font><font color="#333333" class=""> </font><font color="#0086b3" class="">0</font><font color="#333333" class=""> 
    </font><span class="pl-k" style="color: rgb(167, 29, 93); box-sizing: border-box;">else</span><font color="#333333" class=""> {</font><font color="#333333" class=""> }</font></pre><div class=""><br class=""></div></div><div class="">I acknowledge that the semicolon (or newline) versions are "simpler" and probably more suited for complex guard statements with many conditions and possibly also a mix of conditions that aren’t directly related to the optional unwrapping before them. However, I would not want to trade for that for what I feel is the more readable syntax in the more common cases.</div></div><div class=""><br class=""></div><div class=""><div class="">Also, if I read the proposal correctly it would be possible to combine different boolean conditions using a “;”. Meaning this:</div><div class=""><br class=""></div><div class=""><pre class="" style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; margin-top: 0px; margin-bottom: 0px; line-height: 1.45; word-wrap: normal; padding: 16px; overflow: auto; background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-break: normal;"><span style="color: rgb(51, 51, 51);" class=""><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">if</span> x <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">==</span> 0 &amp;&amp; y </span><font color="#a71d5d" class="">&gt;</font><font color="#333333" class=""> x</font><font color="#333333" class=""> {</font><span style="color: rgb(167, 29, 93);" class=""> </span><span style="color: rgb(51, 51, 51);" class="">}</span></pre></div><div class=""><br class=""></div><div class="">would be the same as this:</div><div class=""><br class=""></div><div class=""><div class=""><pre class="" style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; margin-top: 0px; margin-bottom: 0px; line-height: 1.45; word-wrap: normal; padding: 16px; overflow: auto; background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-break: normal;"><span style="color: rgb(51, 51, 51);" class=""><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">if</span> x <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">==</span> 0; y </span><font color="#a71d5d" class="">&gt;</font><font color="#333333" class=""> x</font><font color="#333333" class=""> {</font><span style="color: rgb(167, 29, 93);" class=""> </span><span style="color: rgb(51, 51, 51);" class="">}</span></pre></div><div class=""><br class=""></div></div><div class="">which is more consistent in combining conditions but introduces two different ways of AND-ing two boolean conditions.&nbsp;</div></div><div class="">It’s currently not possible to combine boolean conditions with a comma like this, and if that remains the case with semicolons, then this isn’t an issue.</div><div class=""><br class=""></div><div class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div class=""><font color="#000000" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>• Is the problem being addressed significant enough to warrant a change to Swift?<br class=""></span></font></div></div></blockquote><div class=""><br class=""></div><div class="">I'm not sure about that.&nbsp;</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><font color="#000000" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>• Does this proposal fit well with the feel and direction of Swift?<br class=""></span></font></div></div></blockquote><div class=""><br class=""></div><div class="">Yes</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><font color="#000000" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>• If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to&nbsp;those?<br class=""></span></font></div></div></blockquote><div class=""><br class=""></div><div class="">No</div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><font color="#000000" class=""><span style="background-color: rgba(255, 255, 255, 0);" class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>• How much effort did you put into your review? A glance, a quick reading, or an in-depth study?</span></font></div></div></blockquote><div class=""><br class=""></div>Read the proposal in detail.</div><div class=""><br class=""></div><div class="">- David<br class=""></div><div class=""><br class="">27 maj 2016 kl. 21:11 skrev Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt;:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class="">Hello Swift community,<br class=""><br class="">The review of SE-0099 “Restructuring Condition Clauses” begins now and runs through June 3, 2016. The proposal is available here:<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0099-conditionclauses.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0099-conditionclauses.md</a><div class=""><br class="">Reviews are an important part of the Swift evolution process. All reviews should be sent to the swift-evolution mailing list at<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""><br class="">or, if you would like to keep your feedback private, directly to the review manager. When replying, please try to keep the proposal link at the&nbsp;top of the message:<br class=""><br class=""><i class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Proposal link:<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">                </span><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0099-conditionclauses.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0099-conditionclauses.md</a><br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Reply text<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>Other replies<br class=""></i><br class=""><b class="">What goes into a review?<br class=""></b><br class="">The goal of the review process is to improve the proposal under review through constructive criticism and, eventually, determine the direction&nbsp;of Swift. When writing your review, here are some questions you might want to answer in your review:<br class=""><br class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• What is your evaluation of the proposal?<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• Is the problem being addressed significant enough to warrant a change to Swift?<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• Does this proposal fit well with the feel and direction of Swift?<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• If you have used other languages or libraries with a similar feature, how do you feel that this proposal compares to&nbsp;those?<br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>• How much effort did you put into your review? A glance, a quick reading, or an in-depth study?<br class=""></div><div class=""><br class=""></div>More information about the Swift evolution process is available at<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/apple/swift-evolution/blob/master/process.md" class="">https://github.com/apple/swift-evolution/blob/master/process.md</a><br class=""><br class="">Thank you,<br class=""><br class="">-Joe<br class=""><br class="">Review Manager</div></div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">swift-evolution mailing list</span><br class=""><span class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a></span><br class=""><span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br class=""></div></blockquote></body></html>