[swift-evolution] use standard syntax instead of "do" and "repeat"
Amir Michail
a.michail at me.com
Mon Dec 28 16:15:55 CST 2015
> On Dec 28, 2015, at 1:25 AM, Brent Royal-Gordon <brent at architechies.com> wrote:
>
>> So “try” instead of “do”. If there is no catch, then just use braces without a keyword for a block.
>>
>> And use do-while instead of repeat-while.
>
> Do you also propose no longer marking calls to throwing functions with `try`?
>
Maybe put “throws” after such function calls?
try {
let z = f(x,y) throws
} catch … {
}
You could also have “throws?” and “throws!” following the function call.
> Have you read the "Error-Handling Rationale" document in the Swift repository? If not, please do: <https://github.com/apple/swift/blob/master/docs/ErrorHandlingRationale.rst> If so, please explain why you disagree with it.
>
> --
> Brent Royal-Gordon
> Architechies
>
More information about the swift-evolution
mailing list