[swift-evolution] [Review] SE-0102: Remove @noreturn attribute and introduce an empty NoReturn type

Brent Royal-Gordon brent at architechies.com
Tue Jun 21 18:54:49 CDT 2016

> * [LibraryEvolution.rst] @noreturn is a versioned attribute, so how will this proposal affect that design?

If library evolution permitted you to change a return type into one of its subtypes (for instance, to change an NSObject return into an NSResponder return), and if Never were a subtype-of-all-types bottom type, then you would always be able to change any return type to Never. There may be ABI reasons that this couldn't be supported—for instance, a Boolean existential has a different representation than a concrete Bool struct—but I believe it would be semantically sound.

(Of course, if you had to write `Any<Boolean>` instead of `Boolean`, the fact that you couldn't replace it with `Bool` would be a little more straightforward to understand...)

Brent Royal-Gordon

More information about the swift-evolution mailing list