<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:47 PM, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" class="">xiaodi.wu@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><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="">```</div></div></div></div>
</div></blockquote></div><div><br class=""></div><div>The definition is not a formal one, but that was the intent.</div><div><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div>```</div><div>let b = b where b &gt; anyOtherVariable</div><div>```</div></blockquote><div>is legal as long as `anyOtherVariable` is not defined within the entire condition clause</div><div><br class=""></div><br class=""></body></html>