On Sun, Jun 11, 2017 at 1:52 AM, Haravikk via swift-evolution <
[email protected]> wrote:
>
> With the ability to specify throwaway variables more easily, I'm sticking
> with my using syntax here:
>
> var theNames:[String] = []
> while let eachItem = theIterator.next() using (var theTotal = 0) where
> (theTotal < 100) {
> theNames.append(eachItem.name)
> theTotal += eachItem.value
> }
>
>
> Depending upon your preference on how to structure the using and where
> parts this is shorter and easier.
>
I think you just reinvented the C-style for loop, that was removed in
SE-0007
<https://github.com/apple/swift-evolution/blob/master/proposals/0007-remove-c-style-for-loops.md>
.
--Pavol
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution