[swift-dev] Should we remove _customContainsEquatableElement from stdlib?

Kevin Ballard kevin at sb.org
Thu Dec 31 03:11:43 CST 2015

On Dec 31, 2015, at 1:07 AM, Dave Abrahams <dabrahams at apple.com> wrote:

>> Alternatively, we could work around it by allowing you to say `extension Any : EquatableSequenceType where Self : SequenceType { ... }` and having that essentially extend every concrete type that conforms to SequenceType, which means SequenceType itself doesn't conform to EquatableSequenceType and therefore there's no circular protocol inheritance, but I'm not sure if this is actually an approach we want to take (although this is precisely what Rust does and it works for them).
> I don’t want to create stdlib churn working around the lack of generics features that we expect to have for the next release.  We should just wait for the generics system to be ready.

This suggestion was not meant as a workaround for the genetics limitation but for the following problem:

protocol Foo : Bar {}
protocol Bar : Foo {}

This throws an error about circular protocol inheritance.


More information about the swift-dev mailing list