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

2016-01-01 Thread Ling Wang via swift-dev
After fumbling for several days and firing a related bug(https://bugs.swift.org/browse/SR-435) I finally submitted the pull request: https://github.com/apple/swift/pull/854. Thanks for your help! > On Dec 31, 2015, at 3:49 PM, Dmitri Gribenko wrote: > > On Thu, Dec 31, 2015 at 10:06 PM, Ling

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

2015-12-31 Thread Ling Wang via swift-dev
gt; Got it. `contains` is only declared in extension. Interesting workaround. >>> Thanks. >>> >>>> On Dec 30, 2015, at 4:45 PM, Dmitri Gribenko wrote: >>>> >>>> On Wed, Dec 30, 2015 at 8:34 PM, Ling Wang via swift-dev >>>> wro

Re: [swift-dev] Where are @_attributes documented?

2015-12-31 Thread Ling Wang via swift-dev
7;re working on the stdlib, I wouldn't worry too much about using > any internal attributes right away. The performance team usually handles > adding those where needed. > > -Joe > >>> On Dec 30, 2015, at 7:35 PM, Joe Groff wrote: >>> >>> &

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

2015-12-31 Thread Ling Wang via swift-dev
Dmitri Gribenko wrote: >> >> On Wed, Dec 30, 2015 at 8:34 PM, Ling Wang via swift-dev >> wrote: >>> After reviewing the code of stdlib I found no one actually implements >>> _customContainsEquatableElement: >>> 1. Its default implementation in `Sequen

Re: [swift-dev] Where are @_attributes documented?

2015-12-30 Thread Ling Wang via swift-dev
Yes I’m submitting patches to stdlib. Thanks for pointing me to the doc folder. > On Dec 30, 2015, at 7:35 PM, Joe Groff wrote: > > >> On Dec 30, 2015, at 4:58 PM, Ling Wang via swift-dev >> wrote: >> >> I want to submit some patches but I’m not

[swift-dev] Where are @_attributes documented?

2015-12-30 Thread Ling Wang via swift-dev
I want to submit some patches but I’m not sure whether I should apply some @_attributes(like @_transparent and @_semantics) that I see in stdlib to my API because I don’t know their meanings. Where are they documented? ___ swift-dev mailing list swift-d

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

2015-12-30 Thread Ling Wang via swift-dev
Got it. `contains` is only declared in extension. Interesting workaround. Thanks. > On Dec 30, 2015, at 4:45 PM, Dmitri Gribenko wrote: > > On Wed, Dec 30, 2015 at 8:34 PM, Ling Wang via swift-dev > wrote: >> After reviewing the code of stdlib I found no one a

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

2015-12-30 Thread Ling Wang via swift-dev
After reviewing the code of stdlib I found no one actually implements _customContainsEquatableElement: 1. Its default implementation in `SequenceType` just returns nil. 2. The implementation in `Set` delegates to `contains` which is bad because it reverses their relationship: the default implemen