> On May 26, 2016, at 6:51 AM, Jan E. Schotsman via swift-evolution
> <[email protected]> wrote:
>
>
> On May 26, 2016, at 3:44 PM, Austin Zheng wrote:
>
>> The inimitable Joe Groff provided me with an outline as to how the design
>> could be improved. I've taken the liberty of rewriting parts of the
>> proposal to account for his advice.
>
> Looks like great progress!
>
> A few remarks:
>
> 1.I don't see the need for AllOf. A nested existential also acts as a
> constraint bundle, so you would have to write
>
> Any<ProtocolA, AllOf< ProtocolB, ProtocolC>>
>
> for consistency.
>
> In a "is subclass of" constraint the superclass also acts as a constraint
> bundle, in a sense.
It was strawman syntax to allay some concerns were brought up earlier. At this
point I think it makes the most sense to wait and see what happens to SE-0095,
which will hopefully finalize some sort of existential syntax for Swift 3.x.
>
> 2.If openas never fails why do we need to use optional binding with it?
No good reason, to be honest. I stole the syntax from the Completing Generics
document. The outermost 'openas' shouldn't ever fail, unless somehow additional
requirements or tests (like a where clause) could be attached. However, I
haven't come up with good syntax for such a case, though - "do x openas T { ...
}" is almost as horrific.
>
> 3. You have a typo in the "where clause" section: where Collection.Element
> == Streamable
Oops, good catch. I'll fix that.
>
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution