[swift-users] Swift 4 protocol with associatedtype conforming to itself

Karl Wagner razielim at gmail.com
Wed Jun 7 09:52:26 CDT 2017


> On 7. Jun 2017, at 11:29, Jens Persson via swift-users <swift-users at swift.org> wrote:
> 
> I see, this quote from the introduction of SE-0142 is not to be taken literally then:
> 
> For example, the SequenceType protocol could be declared as follows if the current proposal was accepted:
> 
> protocol Sequence {
>     associatedtype Iterator : IteratorProtocol
>     associatedtype SubSequence : Sequence where SubSequence.Iterator.Element == Iterator.Element
>     ...
> }
> 
> Don't want to nitpick, but it's hard to follow Swift's evolution when proposals like eg SE-0142 (and eg SE-0110) can have status "implemented"  even though they contain statements and examples like the above which simply are not true (when compared to the compiler which supposedly implements the proposal).
> 
> Is there somewhere I can see what *part(s)* of an "implemented" proposal are *actually implemented*?
> 
> Otherwise, I think it would be less confusing if partly implemented proposals were marked as such.
> 
> /Jens
> 

I think that’s just a poor example in the proposal. Constraining "SubSequence: Sequence" is not actually part of SE-0142.

As for implementation status, usually I check the changelog (https://github.com/apple/swift/blob/master/CHANGELOG.md <https://github.com/apple/swift/blob/master/CHANGELOG.md>)

- Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170607/a9c0a774/attachment.html>


More information about the swift-users mailing list