[swift-evolution] Review for: Remove C-style for-loops with conditions and incrementers

Rainer Brockerhoff rainer at brockerhoff.net
Sat Dec 12 12:22:24 CST 2015


On 12/12/15 15:00, Michel Fortin wrote:
> Le 12 déc. 2015 à 9:41, Rainer Brockerhoff via swift-evolution <swift-evolution at swift.org> a écrit :
> 
>> I also propose that the `repeat` clause be extended to the remaining
>> `for-in` loop:
>>
>> for item in sequence {
>> 	print("\(item)")
>> } repeat {
>> 	print(", ")
>> }
>>
>> which will be handy in many situations.
> 
> Are you sure this does what you expect?

Apparently Swift 2.x isn't properly in my brain yet, should've added
`terminator:""` to those prints. Or thought of a better example.

Or added more coffee... :-)

-- 
Rainer Brockerhoff  <rainer at brockerhoff.net>
Belo Horizonte, Brazil
"In the affairs of others even fools are wise
In their own business even sages err."
http://brockerhoff.net/blog/


More information about the swift-evolution mailing list