> On 10 May 2016, at 22:27, Tyler Cloutier via swift-evolution
> <[email protected]> wrote:
>
>>
> And isn’t this the point really. Yes there are many different ways of doing
> something, but there should be one obvious way. IMHO, there is nothing more
> obvious than just
>
> repeat {
>
> }
Yes there is:
while true {
}
is more obvious than repeat { … }
In the first case, the fact that it is a “loop forever” is obvious right there
at the beginning of the loop. In the second case, you have to seek out the end
of the loop to find out that the loop will repeat forever. And it might not be
easy to find the correct bare closing brace in a sea of closing braces in a
complexly structured program.
>
> It’s very clear. It’s not about adding complex control flow, it’s about
> simplifying current syntax. I don’t think anyone is arguing that it’s more
> powerful than what while loops currently offer.
I don’t think it simplifies the syntax, it adds an extra distinct version of
the repeat loop. That’s not simplifying.
>
>
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution