[swift-dev] SR-122 / CollectionsMoveIndices.swift Prototype

Shawn Erickson shawnce at gmail.com
Sun Feb 21 18:35:18 CST 2016


Yeah I was fairly sure that was the direction it should go. Was trying to
understand what existed and why. I was also bucketing things in a
nondestructive way in the short term until I understood more about the
existing Collection code.

Do we want a ForewardCollection like the prototype or just refocus
Collection on that with the two new subprotocols adding in the other
behaviors (existing Collection is mostly forward indexing with where on
Index type to adjust behavior).
On Sun, Feb 21, 2016 at 4:26 PM Dmitri Gribenko <gribozavr at gmail.com> wrote:

> On Sun, Feb 21, 2016 at 4:21 PM, Shawn Erickson <shawnce at gmail.com> wrote:
> > As an FYI I have been playing around with things mostly to get my head
> > around the base changes and implications on the existing stdlib
> > implementation. It is very early still. I have no issues throwing it
> away if
> > I am way off the rails.
>
> Thank you!  I took a look briefly, and I have a question -- why are
> you using ~Indexable as the base protocol?  Indexable itself only
> exists to work around a compiler limitation and implement
> IndexingIterator.  Otherwise we should be using Collection.
>
> Dmitri
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160222/ebb907ac/attachment.html>


More information about the swift-dev mailing list