Not an author, but I asked Ben a similar question during the pitch to one
of yours.

He clarified that the intention was to constrain Filtered to Sequence once
recursive constraints are implemented. Collection will refine to constrain
Filtered to Collection, and Ben said that this was about as far as he was
willing to go in terms of successive refinements.
On Wed, May 3, 2017 at 00:33 Brent Royal-Gordon via swift-evolution <
[email protected]> wrote:

> On Apr 28, 2017, at 5:06 PM, Douglas Gregor via swift-evolution <
> [email protected]> wrote:
>
>
>    - What is your evaluation of the proposal?
>
> I'm in favor of this proposal, and I don't agree with the previous
> reviewers who think this should be coupled with more advanced type system
> features. However, I have a few questions:
>
> * How will associated type inference interact with this? If you write a
> type-specific `filter`, will it be automatically favored over the `Array`
> version, or will you have to manually specify a `Filtered` typealias?
>
> * Do we want to constrain `Filtered` to `Sequence` or `Collection`? Do we
> want to require `where Filtered.Iterator.Element == Self.Iterator.Element`?
>
> * Will `AnySequence`/`AnyCollection` have a `Filtered` of type
> `AnySequence`/`AnyCollection`, or one of type `Array`?
>
> No time for a full review, but I thought it'd be helpful to note these
> things before the review period was up.
>
> --
> Brent Royal-Gordon
> Architechies
>
> _______________________________________________
> 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

Reply via email to