[swift-evolution] repeat loop enhancement
Sean Heber
sean at fifthace.com
Wed Dec 9 15:20:28 CST 2015
This seems like the most sensible thing to me - if you don’t need the variable, just leave it out! Nice and clean and no confusion.
l8r
Sean
> On Dec 9, 2015, at 3:18 PM, Brent Royal-Gordon via swift-evolution <swift-evolution at swift.org> wrote:
>
>>> for x in 1...5 {
>>> … some code…
>>> }
>>
>> for x in 1…5 - what does 1 … 5 mean? What does it mean for x to be in 1 … 5? Now you tell me x isn’t in 1 … 5 and I can replace x with _ what does it mean for _ to be in 1 … 5 and why do I need _ at all? _ isn’t in the loop either. What’s a loop?
>
> You know, I look at this and wonder, why can’t you just say `for 1…5`?
>
> --
> Brent Royal-Gordon
> Architechies
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
More information about the swift-evolution
mailing list