[swift-evolution] [Pitch] Typed throws
matthew at anandabits.com
Mon Feb 27 16:51:01 CST 2017
> On Feb 27, 2017, at 4:44 PM, Zach Waldowski via swift-evolution <swift-evolution at swift.org> wrote:
> On Mon, Feb 27, 2017, at 04:05 PM, Daniel Leping via swift-evolution wrote:
>> David, IMHO, all you say is absolutely true and typed throws might work well, but in theoretic idealistic world. In reality though, you end having more exception types than data types, feature cost rises exponentially and the code becomes cluttered with all the wrapping.
>> I seriously don't understand why would one even think of this feature after it's proven a bad practice by Java community. Even Java based languages (i.e. Scala) have dropped this "feature".
> I share Daniel's concerns 100%. The Swift community is so (rightfully) concerned about stability right now, and all I can see is how this could tie the hands of a future API author.
> I'd love to have those fears mollified. If Swift can noticeably improve on the typed throws model (through type checking, conversion, some ABI guarantees for changing errors, etc.), like Swift has for a lot of features other languages have tried and had trouble with, we should definitely move forward with typed throws. If we can't, it does a lot to hurt what I think is the great success of Swift's error-handling model.
Do you have a sense of the criteria you would use to determine whether the improvements are satisfactory to you or not?
> zach at waldowski.me <mailto:zach at waldowski.me>
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution