I was struggling to subscript a reversed array with
ReversedIndex today, and then discovered this. That can't possibly be correct, can it?
The main reason I created this topic though is that I think the following is unacceptable effort just to subscript a reversed collection with a trivial base index, like an
let reversedArray = [1, 2, 3, 4, 5].reversed() let last = reversedArray[ReversedCollection.Index(0)]
This might as well apply to other APIs that use
ReverseCollection.Index. I suspect source compatibility does not allow us to redesign
ReversedCollection to use the base index type, but does adding
subscript(Base.Index) sound like a reasonable suggestion?