[swift-evolution] Rekindling: "Extending declaration scope to condition for `repeat { } while ()"
Michael Savich
savichmichael at icloud.com
Tue Jun 6 04:05:51 CDT 2017
It recently occurred to me how nice it would be to be if we could avoid declaring variables outside of loops that are only used inside them. I used google’s site specific search (is that the canon way to search swift-evo?) and only found one thread about this, (https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160718/024657.html <https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160718/024657.html>) where from what I could see it got a positive reception.
It would be a special case though, and within an unrelated thread I saw this suggestion (https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001201.html <https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001201.html>) of letting you write a variable declaration in between the repeat keyword and the opening bracket. Personally I prefer this syntax.
Regardless, I’m wondering what happened to this thread? Is there a reason it didn’t get proposed? If the answer is that the discussion simply died down it may be worth revisiting it.
Sent from my Mac
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170606/56cff92f/attachment.html>
More information about the swift-evolution
mailing list