[swift-evolution] [Pitch] Typed throws
David Sweeris
davesweeris at mac.com
Fri Feb 17 13:08:25 CST 2017
> On Feb 17, 2017, at 10:45 AM, Anton Zhilin via swift-evolution <swift-evolution at swift.org> wrote:
>
> Now this is on-topic, I guess.
> Last time we stopped at John McCall’s syntax:
>
> extension MyError: Error { ... }
>
> func foo() throws(MyError) -> MyResult
> It’s conservative and prevents visual ambiguity with extra parentheses.
>
> If we (somewhat) agree on this, then submitting a proposal will be trivial.
>
That mostly works for me. I’m a bit hesitant because I’m not sure how well that syntax would scale (if there are multiple types of errors that could be thrown). If the consensus is that such a scenario isn’t likely to be a problem in practice, then +1
- Dave Sweeris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170217/d1b6976e/attachment.html>
More information about the swift-evolution
mailing list