<div dir="ltr">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><br></div><div>TJ</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 4, 2016 at 3:49 PM, Brent Royal-Gordon via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><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>
<span class=""><br>
>> 1. A backwards-compatible refactoring of `CollectionType.indices`, moving it to `Indexable`.<br>
>><br>
>> 2. A backwards-compatible refactoring of `indexOf(…)` (adding optional `range:` and moving it to `Indexable`).<br>
>><br>
>> 3. The addition of `rangeOf(…)`, `countOf(…)` and `isSorted(…)` to `Indexable` with a TIME complexity of `O(self.count)`.<br>
>><br>
>> 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>
<br>
</span>I don't think you quite understand what `Indexable` is for.<br>
<br>
`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>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Brent Royal-Gordon<br>
Architechies<br>
<br>
_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
</font></span></blockquote></div><br></div>