[swift-evolution] [Review] SE-0102: Remove @noreturn attribute and introduce an empty NoReturn type
pyry.jahkola at iki.fi
Wed Jun 22 07:10:24 CDT 2016
> On 22 Jun 2016, at 14:47, Charlie Monroe via swift-evolution <swift-evolution at swift.org> wrote:
> I can live with Never. But the proposed NoReturn is a single-case solution and would eventually require a code-breaking change anyway were the bottom type implemented under a different name.
Excuse me, but it seems to me you might be missing one important point about the proposal: there's going to be no “the” bottom type — any enum with no cases would act as one if the proposal is accepted. The standard library would just happen name one to stand as the preferred default.
In other words (unless I'm mistaken), no compiler magic proposed about a specific (`NoReturn` or `Never`) empty enum. All the proposed “magic” would be about uninhabited types <https://github.com/apple/swift-evolution/blob/master/proposals/0102-noreturn-bottom-type.md#language-design> (link to specific section in the proposal) as return types.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution