<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=""><div class=""><br class=""></div><div><blockquote type="cite" class=""><div class="">On May 10, 2016, at 1:10 PM, Austin Zheng via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Agreed. I'm not convinced that this actually prevents any more errors than it might cause (forgot to finish writing my "repeat" block, and now my app is unresponsive), and I don't think there's enough of an expressivity win to add another keyword.</div></div></blockquote><div><br class=""></div><div>Certainly it’s not adding a new keyword, however it is changing the meaning of a keyword.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">Austin</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, May 10, 2016 at 1:04 PM, Haravikk via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><span class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On 10 May 2016, at 08:27, Nicholas Maccharoli via swift-evolution <<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>> wrote:</div><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-family:'comic sans ms',sans-serif;color:rgb(39,78,19)"><br class=""></div><div class="gmail_default" style="font-family:'comic sans ms',sans-serif;color:rgb(39,78,19)">But I think it might be best to change the syntax / behaviour of `repeat` to loop </div><div class="gmail_default" style="font-family:'comic sans ms',sans-serif;color:rgb(39,78,19)">indefinitely if no trailing while clause is present:</div><div class="gmail_default" style="font-family:'comic sans ms',sans-serif;color:rgb(39,78,19)"><br class=""></div><div class="gmail_default" style="font-family:'comic sans ms',sans-serif;color:rgb(39,78,19)"> repeat {</div><div class="gmail_default" style="font-family:'comic sans ms',sans-serif;color:rgb(39,78,19)"> if ... { break }</div><div class="gmail_default" style="font-family:'comic sans ms',sans-serif;color:rgb(39,78,19)"> //...</div><div class="gmail_default" style="font-family:'comic sans ms',sans-serif;color:rgb(39,78,19)"> }</div></div></div></blockquote><br class=""></div></span><div class="">-1 from me on both counts; the thing I like about while true is that it’s explicit about what I meant, whereas a repeat block with no while clause is indistinguishable from me forgetting to include one, or me wanting an infinite loop.</div><div class=""><br class=""></div><div class="">An alternative could be to add a new “forever” keyword or something similar, replacing while true wherever applicable, but personally I don’t think it’s that important.</div></div><br class="">_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
<br class=""></blockquote></div><br class=""></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>