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

Jens Persson jens at bitcycle.com
Wed Jun 7 12:25:19 CDT 2017


Ok, thanks!

On Wed, Jun 7, 2017 at 4:52 PM, Karl Wagner <razielim at gmail.com> wrote:

>
> 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)
>
> - Karl
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170607/14a5b3be/attachment.html>


More information about the swift-users mailing list