[swift-evolution] [Proposal] Typed throws

Matthew Johnson matthew at anandabits.com
Sat Feb 18 10:37:25 CST 2017


Thank you for taking the time to put this proposal together Anton!  I really want to see typed throws make it into Swift 4.  This will be a very nice feature to have.

I noticed that you included Joe Groff’s idea of replacing `rethrows` by making every function have an error type which is by default `Never` for non-throwing functions and `Error` for throwing functions that do not specify an error type.  

I want to urge you to consider updating the proposal to take this direction now rather than later.  This is a breaking change which means the longer we wait the harder it is to justify.  In fact, I think incorporating the breaking change could increase the chances of it being accepted for Swift 4.  Without that it is a purely additive change and those are not being given priority in the Swift 4 release.


> On Feb 18, 2017, at 6:54 AM, Anton Zhilin via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I’ve created a proposal draft, copy-pasting some parts from David Owens’ proposal.
> Here it is <https://gist.github.com/Anton3/3e4081da1adbc6e7a7f377987985c289>.
> 
> I had to make one addition, which hasn’t been discussed yet. Look at Multiple throwing calls <https://gist.github.com/Anton3/3e4081da1adbc6e7a7f377987985c289#multiple-throwing-calls-in-one-do-block> section. Is this feature controversal, or it’s fine to keep in the proposal? Is it feasible from implementation point of view?
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170218/a983c037/attachment.html>


More information about the swift-evolution mailing list