[swift-evolution] Swift Generic Subtype Problem

Chris Lattner clattner at apple.com
Tue Feb 16 00:10:35 CST 2016

> On Feb 15, 2016, at 9:35 PM, Cao Jiannan via swift-evolution <swift-evolution at swift.org> wrote:
> What is the type relation between A!, A?, A and B!, B?, B (if B is subtype of A)
> This made a clear answer hard to answer.
> In my opinion, A!, A?, A should be the same class, the only difference is the runtime checking, 
> not using the generic checking, because they are really the same type.

I think that the difference between “A" and "A?” is very clear and works well in Swift, but you’re right that the current definition of A! (aka ImplicitlyUnwrappedOptional<A>), and it’s relation to Optional is problematic in various ways.  Joe Pamer is leading an effort to revisit our design for IUO and will be bringing some thoughts to this list when he’s ready.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160215/2d174c8a/attachment.html>

More information about the swift-evolution mailing list