<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 May 31, 2016, at 1:59 PM, Brandon Knope &lt;<a href="mailto:bknope@me.com" class="">bknope@me.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class=""></div><div class="">Except "b" is the main focus of the where clause and b was just in the preceding if condition.&nbsp;</div><div class=""><br class=""></div><div class="">I feel like we are trying to find ways to break the current where clause even though we've enjoyed it for almost a year now. I had no idea it was problematic and restrictive. I thought it made its intent very clear...leading to very readable code.&nbsp;</div><div class=""><br class=""></div><div class="">Pretty soon almost every construct but conditionals will be allowed to have where clauses, and THAT seems inconsistent to me.&nbsp;</div><div class=""><br class=""></div><div class="">...what exactly is the current problem? Can someone show me a real world example?? I've already forgotten it in all of this discussion -_-</div><div class=""><br class=""></div><div class="">Brandon&nbsp;</div><div class=""><br class=""></div></div></div></blockquote><div><br class=""></div><div>I did this to explore why many people are reluctant to give-up ‘where’. The use of ‘where' seems intuitive to mess well, and I did not understand why. It seems to natural group all logic concerning a&nbsp;constant with its definition and this seems to be a way to do that.</div><div><br class=""></div><div>These rules add restrictions, but it does group related elements. &nbsp;I am not convinced that this improves the language, but I though that it was worth exploring. &nbsp;</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class="">On May 31, 2016, at 3:47 PM, Xiaodi Wu via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, May 31, 2016 at 2:45 PM, Christopher Kornher via swift-evolution <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word" class=""><span class=""><div class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px" class=""><div class="gmail_extra"><div class="gmail_quote"><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"><br class="">Not allowed:<br class="">…<br class="">let a = a<br class="">let b = b where b &gt; 10 &amp;&amp; a &gt; 5<br class=""></blockquote><div class=""><br class=""></div><div class="">Why would this not be allowed by your rule? You're making use of `b` in your where clause. As I demonstrated above, essentially any assertion can be rewritten to work around your rule. In general:</div></div></div></div></div></blockquote><br class=""></div></span><div class="">It is not allowed because &nbsp;‘a’ is defined in the line above. It must be defined in the ‘if let’ associated with the where in which it is mentioned.</div></div></blockquote><div class=""><br class=""></div><div class="">That's a much more restrictive where clause than you proposed earlier. You'd not be able to write:</div><div class=""><br class=""></div><div class="">```</div><div class="">let b = b where b &gt; anyOtherVariable</div><div class="">```&nbsp;</div></div><br class=""></div></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></div></div></blockquote></div><br class=""></body></html>