[swift-evolution] [Pitch] Typed throws

Adrian Zubarev adrian.zubarev at devandartist.com
Fri Feb 17 14:24:17 CST 2017


Wouldn’t that mean that you couldn’t use your Swift library in Objective-C anymore, at least the error type as an NSError?



-- 
Adrian Zubarev
Sent with Airmail

Am 17. Februar 2017 um 21:16:57, Tino Heth (2th at gmx.de) schrieb:


I thought it was going to be any one subtype of Error, be it a struct, an enum, or a protocol existential, or Error itself.

Imho we should remove the restriction that you can only throw Error-conforming types if typed throws are added:
It's a compatibility feature, and if you manually declare what can be thrown, you should be allowed to break with Objective-C.

As Error has no requirements at all, it looks like harassment, as its whole magic is neither visible nor necessary.

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


More information about the swift-evolution mailing list