Re: [swift-evolution] [Pitch] Never as a bottom type

2017-05-14 Thread André Videla via swift-evolution
> Joe also referred to the following model in a thread about Typed Throws. > >() -> () == () throws Never -> () >() throws -> () == () throws Error -> () That makes sense! As a bottom type it would be perfectly fit for this. > On 15 May 2017, at 03:01, Robert Widmann

Re: [swift-evolution] Swift's Optional Int as NSNumber in Objective-C

2017-05-14 Thread Kenny Leung via swift-evolution
> On May 12, 2017, at 9:56 AM, John McCall via swift-evolution > wrote: > Exporting Int? as an optional NSNumber does not feel obvious and idiomatic > when we would export Int as NSInteger. It feels like reaching for an > arbitrary solution. I don’t understand

Re: [swift-evolution] [Pitch] Never as a bottom type

2017-05-14 Thread Yuta Koshizawa via swift-evolution
Joe also referred to the following model in a thread about Typed Throws. () -> () == () throws Never -> () () throws -> () == () throws Error -> () https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20170213/032267.html It means `Never` must be a subtype of `Error`. I think

Re: [swift-evolution] [Pitch] Never as a bottom type

2017-05-14 Thread Robert Widmann via swift-evolution
> > But it has its limits, most notably, it cannot be used as an expression > > let dunno: Int = fatalError("what should I put here?") // cannot convert > value of type 'Never' > Though our type lattice doesn’t necessarily have a bottom in the way you’re looking for, you can use

Re: [swift-evolution] [Pitch] Never as a bottom type

2017-05-14 Thread Xiaodi Wu via swift-evolution
Clearly many uses for this; would like to see it some day, definitely. However, IIRC, the last day for any _code_ to be incorporated in Swift 4 is June 1. There's simply no chance that this can be considered for the current phase of Swift evolution. When it does come into scope (which will depend

[swift-evolution] [Pitch] Never as a bottom type

2017-05-14 Thread André Videla via swift-evolution
Hi Swift-Evolution, At the end of SE-0102 (https://github.com/apple/swift-evolution/blob/master/proposals/0102-noreturn-bottom-type.md) it is mentioned that the Never type could be used as a universal bottom type but that is currently not the case. As of today the Never type is used as a