<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">That was my reasoning behind choosing Indexable and not CollectionType.<div class=""><br class=""></div><div class="">Neither the Swift documents, nor the “headers” indicate any semi-privateness of Indexable, AFAIK.</div><div class="">(Apart from maybe Base._Element kind of hinting at it, but then again it’s Indexable, not _Indexable.)</div><div class=""><br class=""></div><div class="">Anyway, I’d be totally fine with sticking it on CollectionType, if that’s preferred.</div><div class=""><br class=""></div><div class="">Vincent<br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 05 Jan 2016, at 00:58, T.J. Usiyan via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">The proposed additions to Indexible only require Indices… I don't see how adding them is such a mistake. If we can gain these behaviors while only *requiring* that minimum interface… go for it.<div class=""><br class=""></div><div class="">TJ</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Jan 4, 2016 at 3:49 PM, Brent Royal-Gordon via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm not sure about the rest of this, but...<br class="">
<span class=""><br class="">
>> 1. A backwards-compatible refactoring of `CollectionType.indices`, moving it to `Indexable`.<br class="">
>><br class="">
>> 2. A backwards-compatible refactoring of `indexOf(…)` (adding optional `range:` and moving it to `Indexable`).<br class="">
>><br class="">
>> 3. The addition of `rangeOf(…)`, `countOf(…)` and `isSorted(…)` to `Indexable` with a TIME complexity of `O(self.count)`.<br class="">
>><br class="">
>> 4. The introduction of a `BinarySearchView` on `Indexable`, allowing for fast (`O(log2(self.count))`) searches on `Indexable` via `indexOf(…)`, `rangeOf(…)`, `countOf(…)`, `lowerBoundOf(…)`, `upperBoundOf(…)` without cluttering `Indexable`'s interface.<br class="">
<br class="">
</span>I don't think you quite understand what `Indexable` is for.<br class="">
<br class="">
`Indexable` is a minimal protocol containing the very most basic parts of `CollectionType`'s interface. It's used to avoid circular definitions in `CollectionType`. The doc comments on it describe it as "almost an implementation detail". I don't think it's appropriate to move a whole bunch of stuff into `Indexable` when it's supposed to be a minimal protocol.<br class="">
<span class="HOEnZb"><font color="#888888" class=""><br class="">
--<br class="">
Brent Royal-Gordon<br class="">
Architechies<br class="">
<br class="">
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</font></span></blockquote></div><br class=""></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=VbTStA9jyILqr7IzQe9KAt-2FaH8ZqpHcRullRxZjIJSabq6Vr4DakVqvoieTGrxJvz87kpHmCI6o5CcBH7r9UVjLveX93Y1zfSs6d4P9tFJQ0a-2BxQIxbJi8sRSNLUyHOo6Ves48wVPI2qhOFklQGb2hBxHHMYxjygzXb6eco5SS5VRG0nLRXj3y-2B9S1S96CprQBzmTKvGY8QY-2FN4iH0ismqMLNnPwZ7W0JTCsM7lATT-2FIzdVYEY8PBGEVbQigKck7" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></div></body></html>