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

Ben Rimmington me at benrimmington.com
Wed Jun 22 06:31:21 CDT 2016


> On 22 Jun 2016, at 02:15, Shawn Erickson via swift-evolution <swift-evolution at swift.org> wrote:
> 
> Curious on the possibility of something like the following to denote a no return function?
> 
> func foo() -> !

See "Diverging functions" in "The Rust Programming Language":

<https://doc.rust-lang.org/book/functions.html#diverging-functions>

I suggested using an underscore, but a named type could work better with optional chaining:

<http://thread.gmane.org/gmane.comp.lang.swift.evolution/19715/focus=20000>

-- Ben



More information about the swift-evolution mailing list