Yeah after going though this thread again modifying the repeat keyword seems like overkill.<div><br></div>while true { } isn't broken but I really like Ruby's loop { ... } keyword.<div><br></div><div>but adding a new loop type to swift just for replacing a special case of the while loop also seems like a little too much.</div><div><br></div><div>If there isn't a strong argument for adding a loop keyword then I guess this thread is at it's end for now.<span></span></div><div><br></div><div>Thanks for the feedback!</div><div><br></div><div>- Nick</div><div><div><div><div><br></div><div><div><br>2016年5月12日木曜日、Chris Lattner via swift-evolution<<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>>さんは書きました:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> On May 10, 2016, at 6:11 PM, Tyler Cloutier <<a href="javascript:;" onclick="_e(event, 'cvml', 'cloutiertyler@aol.com')">cloutiertyler@aol.com</a>> wrote:<br>
><br>
><br>
>> On May 10, 2016, at 5:56 PM, Chris Lattner <<a href="javascript:;" onclick="_e(event, 'cvml', 'clattner@apple.com')">clattner@apple.com</a>> wrote:<br>
>><br>
>><br>
>>> On May 10, 2016, at 4:13 PM, Cole Campbell via swift-evolution <<a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">swift-evolution@swift.org</a>> wrote:<br>
>>><br>
>>> I agree that repeat { } is ambiguous because you have to look to the end for a while clause to determine if it's infinite or not.<br>
>><br>
>> Right, this is the downside that I see with “repeat {}”.<br>
><br>
><br>
> Not to beat a dead horse, but isn’t this also true of<br>
><br>
> repeat { ...<br>
<br>
> while true { …<br>
<br>
No, because today you always know that repeat has a condition, and that while does not. That’s the point.<br>
<br>
<br>
>> Another option is to make it a statement modifier, which wouldn’t require taking it as a keyword (but also doesn’t read as well):<br>
>><br>
>> forever repeat { }<br>
>><br>
>><br>
>> Personally, I don’t see this as a big enough improvement over “while true” to be worth introducing complexity for.<br>
>><br>
><br>
> If you are referring to “forever", I also don’t think that adding a new keyword is an improvement over “while true”.<br>
<br>
I agree. Even if it didn’t take a keyword, Idon’t think that “repeat forever” is worth adding over “while true”.<br>
<br>
-Chris<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'swift-evolution@swift.org')">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></div></div></div></div></div><br><br>-- <br><div dir="ltr"><br><div>All the best,</div><div><br></div><div>Nicholas</div><div><br></div><div>Linked in:</div><div><font size="2"><a href="http://lnkd.in/328U22" target="_blank">http://lnkd.in/328U22</a></font><br></div><div><br></div></div><br>