<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jun 11, 2017 at 1:52 AM, Haravikk 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><br></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div>With the ability to specify throwaway variables more easily, I&#39;m sticking with my using syntax here:</div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font face="Monaco">var theNames:[String] = []</font></div><div><font face="Monaco">while let eachItem = theIterator.next() using (var theTotal = 0) where (theTotal &lt; 100) {</font></div><div><font face="Monaco"><span class="gmail-m_6134952961082030135m_225386513829070979Apple-tab-span" style="white-space:pre-wrap">        </span>theNames.append(eachItem.name)</font></div><div><font face="Monaco"><span class="gmail-m_6134952961082030135m_225386513829070979Apple-tab-span" style="white-space:pre-wrap">        </span>theTotal += eachItem.value</font></div><div><font face="Monaco">}</font></div></blockquote><br><div>Depending upon your preference on how to structure the using and where parts this is shorter and easier.</div></div></blockquote><div><br></div><div>I think you just reinvented the C-style for loop, that was removed in <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0007-remove-c-style-for-loops.md">SE-0007</a>.</div><div><br></div><div>--Pavol</div></div></div></div>