[swift-evolution] [Pitch] Typed throws
Chris Lattner
clattner at nondot.org
Sun Feb 19 12:02:49 CST 2017
> On Feb 17, 2017, at 11:29 AM, Matthew Johnson via swift-evolution <swift-evolution at swift.org> wrote:
>
>
>> On Feb 17, 2017, at 1:24 PM, Xiaodi Wu via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>>
>> Let's not bring bikeshedding the commonly proposed and rejected union spelling into this.
>> Typed throws would be a nice addition, assuming that the core team finds it in scope for phase 2. It seems only logical that any type can be thrown (i.e. conforms to Error) should be permitted to be listed in `throws()`.
>
> Agree. Typed throws should have a single thrown type. Making it more convenient to throw and catch more than one error type with typed throws without having to manually create a wrapper is an orthogonal issue. David Owens convinced me of this last year when we had a thread on the topic.
+1
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170219/89c33f2a/attachment.html>
More information about the swift-evolution
mailing list