> I do have an honest question that comes from ignorance rather than malice:
> has anyone actually used .times in ruby outside of the context of learning or
> testing?
I've seen it used to retry a failing operation a certain number of times:
5.times do
return true if do_network_call
sleep 5
end
raise NetworkCallFailedError
Of course, that requires you to be able to return out of the surrounding
function from the `times` loop, which you can do in Ruby but not in Swift.
--
Brent Royal-Gordon
Architechies
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution