I think, on the contrary, it&#39;s missing the point utterly. It&#39;s up to those proposing a new feature to justify its addition in light of what&#39;s already here, and it&#39;s up to those proposing the removal of a feature to justify why it should be removed.<br><br>Certainly no one is proposing the removal of the while loop. Currently, the One Obvious Way of making an infinite loop is `while true`, and it is up to the proponents to advance a reason why a replacement would be superior. I cannot think of a greater non-sequitur than supplying a demonstration of why while loops are useful.<br><div class="gmail_quote"><div dir="ltr">On Tue, May 10, 2016 at 16:27 Tyler Cloutier via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On May 10, 2016, at 2:13 PM, Harlan Haskins via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br><div><div style="word-wrap:break-word"><div style="margin:0px;font-size:11px;line-height:normal"><span>You could always do your control flow with goto’s anyway…</span></div><div style="margin:0px;font-size:11px;line-height:normal"><span><br></span></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>func</span><span> foo() {</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>  </span><span>var</span><span> i = </span><span>0</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>  </span><span>func</span><span> goto(</span><span>_</span><span> label: </span><span>String</span><span> = </span><span>&quot;entry&quot;</span><span>) {</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>    </span><span>switch</span><span> label {</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>    </span><span>case</span><span> </span><span>&quot;entry&quot;</span><span>:</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>      </span><span>print</span><span>(</span><span>&quot;beginning loop…&quot;</span><span>)</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>      </span><span>goto</span><span>(</span><span>&quot;cond&quot;</span><span>)</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>    </span><span>case</span><span> </span><span>&quot;cond&quot;</span><span>:</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>      </span><span>goto</span><span>(i &lt; </span><span>10</span><span> ? </span><span>&quot;body&quot;</span><span> : </span><span>&quot;end&quot;</span><span>)</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>    </span><span>case</span><span> </span><span>&quot;body&quot;</span><span>:</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>      i += </span><span>1</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>      </span><span>print</span><span>(</span><span>&quot;</span><span>\</span><span>(</span><span>i</span><span>)&quot;</span><span>)</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>      </span><span>goto</span><span>(</span><span>&quot;cond&quot;</span><span>)</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>    </span><span>case</span><span> </span><span>&quot;end&quot;</span><span>:</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>      </span><span>break</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>    </span><span>default</span><span>: </span><span>break</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><span><font face="Menlo">    }</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><span><font face="Menlo">  }</font></span></div><div style="margin:0px;font-size:11px;line-height:normal"><font face="Menlo"><span>  </span><span>goto</span><span>()</span></font></div><div style="margin:0px;font-size:11px;line-height:normal"><span><font face="Menlo">}</font></span></div><div style="margin:0px;font-size:11px;line-height:normal;min-height:13px"><font face="Menlo"><span></span><br></font></div><div style="margin:0px;font-size:11px;line-height:normal">Apologies,</div><div style="margin:0px;font-size:11px;line-height:normal">Harlan</div></div></div></blockquote><div><br></div><div><br></div></div></div><div style="word-wrap:break-word"><div><div>And isn’t this the point really. Yes there are many different ways of doing something, but there should be one obvious way. IMHO, there is nothing more obvious than just </div><div><br></div><div>repeat {</div><div><br></div><div>}</div><div><br></div><div>It’s very clear. It’s not about adding complex control flow, it’s about simplifying current syntax. I don’t think anyone is arguing that it’s more powerful than what while loops currently offer.</div></div></div><div style="word-wrap:break-word"><div><div><br></div><br><blockquote type="cite"><div><div style="word-wrap:break-word"><div style="margin:0px;font-size:11px;line-height:normal"><br></div><div><blockquote type="cite"><div>On May 10, 2016, at 2:05 PM, Taras Zakharko via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br><div><div>When I need a loop with complex control flow that does not fit into the classical while {} or repeat {} while structure, I use this:<br><br>do_stuff: do {<br>  …<br>  continue do_stuff<br>} <br><br>This pattern explicit and allows very complex control flow patterns without the drawbacks of the unrestricted goto construct. <br><br>Therefore I don’t see utility with having a repeat {} without while clause. <br><br>Best, <br><br> Taras<br><br><br><blockquote type="cite">On 10 May 2016, at 22:39, Dominik Pich via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br><br><br><blockquote type="cite"><blockquote type="cite">On May 10, 2016, at 3:30 PM, Tyler Cloutier via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br><br>Secondly it’s a very simple way of introducing new programmers to loops. It’s IMHO more clear to a new programmer that repeat will just repeat indefinitely vs while true.<br></blockquote><br>This point seems strange to me - why teach a new programmer about loops by first showing them a looping construct they should probably never use in actual practice until they really know what they’re doing?<br></blockquote>totally agree… it would be a bad first introduction, id say :)<br><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" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></blockquote><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" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div></div></blockquote></div><br></div>_______________________________________________<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></div>_______________________________________________<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>