So what’s the solution – should
RangeReplaceableCollectionTypemandate the kind of index validity behaviour our
removealgorithm relies on? Or are the assumptions invalid and we need a better algorithm? (of which more in a later article) The Swift standard library is still evolving rapidly with each beta so it’s possibly a little early to tell. For now, be careful about the assumptions you make – just because all the current implementations of a particular protocol work a certain way doesn’t mean other implementations will.
Stay up-to-date by subscribing to the Comments RSS Feed for this post.