<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="">I do not see how this is more readable. The current for loop is perfectly readable and conveys the intent very well IMO: it executes a code block FOR every ELEMENT that is IN a SEQUENCE. In contrast, I find your proposal rather confusing: it combines a number of different constructions with different semantics and generally is less transparent.&nbsp;<div class=""><div class=""><br class=""></div><div class="">Best,&nbsp;</div><div class=""><br class=""></div><div class="">&nbsp;Taras</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 30 Mar 2016, at 21:54, Nathanial Burton-Bradford via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">

<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">Swift Control Flow using Loops&nbsp;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">One of Swifts strengths is clear, readable INTENT, conveyed by the languages Keyword tokens. For anyone new to programming, clear, readable intent, goes a long way in helping them master the language, by helping reduce
 logical/semantic errors caused by a misunderstanding of the names used in specifying the languages keyword tokens…</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">Swift’s control flow keywords can be ambiguous, in this respect, when conveying the functional intent of loop control logic, within the language.</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">I would like to open up discussion, therefore, regarding the possible renaming of Swift’s control flow keywords, with the hope that this leads to clearer INTENT regarding loops.&nbsp;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">Replace For-In with </span><span style="-webkit-font-kerning: none; color: rgb(107, 33, 133); -webkit-text-stroke-color: rgb(107, 33, 133);" class="">Loop Using&nbsp;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">for foo in d…y <span class="Apple-tab-span" style="white-space:pre">
</span></span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">loop</span><span style="font-kerning: none" class=""> foo
</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">using</span><span style="font-kerning: none" class=""> d…y</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">For x in 1…5<span class="Apple-tab-span" style="white-space:pre">
</span></span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">loop</span><span style="font-kerning: none" class=""> x
</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">using</span><span style="font-kerning: none" class=""> 1…5</span></div>
<div class=""><br class="">
</div>
<div class="">
<div style="-webkit-text-stroke-width: initial; margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0);" class="">
<span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">loop</span><span style="-webkit-font-kerning: none;" class="">&nbsp;i=0&nbsp;</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">using</span><span style="-webkit-font-kerning: none;" class="">&nbsp;i&lt;10</span></div>
<div style="-webkit-text-stroke-width: initial; margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); min-height: 13px;" class="">
<span style="-webkit-font-kerning: none;" class=""></span><br class="">
</div>
<div style="-webkit-text-stroke-width: initial; margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0);" class="">
<span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">loop</span><span style="-webkit-font-kerning: none;" class="">&nbsp;i&nbsp;</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">using</span><span style="-webkit-font-kerning: none;" class="">&nbsp;0..&lt;10</span></div>
<div style="-webkit-text-stroke-width: initial; margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); min-height: 13px;" class="">
<span style="-webkit-font-kerning: none;" class=""></span><br class="">
</div>
<div style="-webkit-text-stroke-width: initial; margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); min-height: 13px;" class="">
<span style="-webkit-font-kerning: none;" class=""></span><br class="">
</div>
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">For _ in 1 …power<span class="Apple-tab-span" style="white-space:pre">
</span></span><span class="Apple-tab-span" style="white-space: pre;"></span>———-&gt;<span class="Apple-tab-span" style="white-space: pre;">
</span><span style="-webkit-text-stroke-width: initial; -webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">loop using</span><span style="-webkit-text-stroke-width: initial; -webkit-font-kerning: none;" class="">
 1…power</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">“The underscore character (_) used in place of a loop variable causes the individual values to be ignored and does not provide access to the current value during each iteration of the loop.”</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">I feel underscore character (_) is confusing, semantically.&nbsp;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<br class="">
<span style="font-kerning: none" class=""></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">let names = ["Anna", "Alex", "Brian", “Jack"]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">for name in names {<span class="Apple-tab-span" style="white-space:pre">
</span>———-&gt;<span class="Apple-tab-span" style="white-space:pre"> </span></span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">loop</span><span style="font-kerning: none" class="">
 names </span><span style="-webkit-font-kerning: none; color: rgb(107, 33, 133); -webkit-text-stroke-color: rgb(107, 33, 133);" class="">using</span><span style="font-kerning: none" class=""> name {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; print("Hello, \(name)!")</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">Note : </span><span style="-webkit-font-kerning: none; color: rgb(107, 33, 133); -webkit-text-stroke-color: rgb(107, 33, 133);" class="">loop</span><span style="font-kerning: none" class=""> ARRAY
</span><span style="-webkit-font-kerning: none; color: rgb(107, 33, 133); -webkit-text-stroke-color: rgb(107, 33, 133);" class="">using</span><span style="font-kerning: none" class=""> ELEMENT(S) - which is logically consistent with ‘-using’ as last keyword
 instance.</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">let numberOfLegs = ["spider": 8, "ant": 6, "cat": 4]</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">for (animalName, legCount) in numberOfLegs {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; print("\(animalName)s have \(legCount) legs")</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">loop</span><span style="font-kerning: none" class=""> numberOfLegs
</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">using
</span><span style="font-kerning: none" class="">(animalName, legCount) {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class=""><span class="Apple-tab-span" style="white-space:pre"></span>print(“ \(animalName)s have \(legCount) Legs”)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">}</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">Note : Again </span><span style="-webkit-font-kerning: none; color: rgb(107, 33, 133); -webkit-text-stroke-color: rgb(107, 33, 133);" class="">loop</span><span style="font-kerning: none" class=""> ARRAY
</span><span style="-webkit-font-kerning: none; color: rgb(107, 33, 133); -webkit-text-stroke-color: rgb(107, 33, 133);" class="">using</span><span style="font-kerning: none" class=""> ELEMENT(S) - which is logically consistent with ‘-using’ as last keyword
 instance.</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">for (airportCode, airportName) in airports {<span class="Apple-tab-span" style="white-space:pre">
</span></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">loop</span><span style="font-kerning: none" class=""> airports
</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">using
</span><span style="font-kerning: none" class="">(airportCode, airportName)</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">&nbsp;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">for airportCode in airports.keys {<span class="Apple-tab-span" style="white-space:pre">
</span></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">loop</span><span style="font-kerning: none" class=""> airports.keys
</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">using
</span><span style="font-kerning: none" class="">airportCode</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">
</span><span style="font-kerning: none" class="">{</span></div><p style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp;</span><br class="webkit-block-placeholder"></p><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">for airportName in airports.values {<span class="Apple-tab-span" style="white-space:pre">
</span></span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">loop</span><span style="font-kerning: none" class=""> airports.values
</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">using
</span><span style="font-kerning: none" class="">airportName</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">
</span><span style="font-kerning: none" class="">{</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">for value in array[1..&lt;array.count] {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">loop</span><span style="font-kerning: none" class=""> array[1..&lt;array.count]
</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">using
</span><span style="font-kerning: none" class="">value</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">‘while’ using </span><span style="-webkit-font-kerning: none; color: rgb(107, 33, 133); -webkit-text-stroke-color: rgb(107, 33, 133);" class="">loop while</span><span style="font-kerning: none" class="">&nbsp;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="-webkit-font-kerning: none; color: rgb(107, 33, 133); -webkit-text-stroke-color: rgb(107, 33, 133);" class="">loop while</span><span style="font-kerning: none" class=""> square &lt; finalSquare {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; // roll the dice</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; diceRoll += 1</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; if diceRoll == 7 { diceRoll = 1 }</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; // move by the rolled amount</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">Control transfer statements</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">repeat { <span class="Apple-tab-span" style="white-space:pre">
</span>——&gt;<span class="Apple-tab-span" style="white-space:pre"> </span></span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">loop</span><span style="font-kerning: none" class=""> {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">…</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">} while&nbsp;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">“Break</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">The break statement ends execution of an entire control flow statement immediately. ”</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">I propose replacing Break, in loops, with
</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">exit now</span><span style="font-kerning: none" class=""> (intent is explicit)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">Note: Labeled Statements with break -&nbsp;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class=""><span class="Apple-tab-span" style="white-space:pre"></span>break gameLoop
<span class="Apple-tab-span" style="white-space:pre"></span></span><span style="-webkit-font-kerning: none; color: rgb(107, 33, 133); -webkit-text-stroke-color: rgb(107, 33, 133);" class="">exit now</span><span style="font-kerning: none" class=""> gameLoop</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">“Continue</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">The continue statement tells a loop to stop what it is doing and start again at the beginning of the next iteration through the loop.”</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">“switch character {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; case "a", "e", "i", "o", "u", " ":</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; color: rgb(85, 19, 107); -webkit-text-stroke-color: rgb(85, 19, 107); -webkit-text-stroke-width: initial;" class="">
<span style="-webkit-font-kerning: none; -webkit-text-stroke-color: rgb(0, 0, 0);" class="">&nbsp; &nbsp; &nbsp; &nbsp; continue
<span class="Apple-tab-span" style="white-space:pre"></span></span><span style="font-kerning: none" class="">// Continue what? to next line? to end? to beginning?</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; default:</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; &nbsp; &nbsp; puzzleOutput.append(character)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; }”</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">I propose replacing continue with </span>
<span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">next cycle
</span><span style="font-kerning: none" class="">or</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class=""> next loop</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">“switch character {</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; case "a", "e", "i", "o", "u", " ":</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; color: rgb(107, 33, 133); -webkit-text-stroke-color: rgb(107, 33, 133); -webkit-text-stroke-width: initial;" class="">
<span style="-webkit-font-kerning: none; -webkit-text-stroke-color: rgb(0, 0, 0);" class="">&nbsp; &nbsp; &nbsp; &nbsp;
</span><span style="-webkit-font-kerning: none; color: rgb(148, 33, 147); -webkit-text-stroke-color: rgb(148, 33, 147);" class="">next cycle</span><span style="-webkit-font-kerning: none; -webkit-text-stroke-color: rgb(0, 0, 0);" class="">
<span class="Apple-tab-span" style="white-space:pre"></span></span><span style="font-kerning: none" class="">// intent is explicit</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; default:</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; &nbsp; &nbsp; puzzleOutput.append(character)</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">&nbsp; &nbsp; }”</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial;" class="">
<span style="font-kerning: none" class="">Note: Labeled Statements with Continue - as per Break example,
</span><span style="-webkit-font-kerning: none; color: rgb(107, 33, 133); -webkit-text-stroke-color: rgb(107, 33, 133);" class="">next cycle gameLoop</span><span style="font-kerning: none" class="">&nbsp;</span></div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div><div style="margin: 0px; font-size: 11px; line-height: normal; -webkit-text-stroke-color: rgb(0, 0, 0); -webkit-text-stroke-width: initial; min-height: 13px;" class="">
<span style="font-kerning: none" class=""></span><br class="">
</div>
</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=""></div></div></body></html>