That's great! I'm not as unhappy with the status quo as it might have seemed, though ;-)
Especially, I found the link to https://github.com/apple/swift-evolution/blob/master/proposals/0065-collections-move-indices.md to be quite useful, as it shows a simple remedy for awkward repetition like someStringWithAQuiteLongName[someStringWithAQuiteLongName.index(after: someStringWithAQuiteLongName.firstIndex(of: ".")!)]
I just wanted to express that I understand the motivation to disallow certain operations, and it seems that we share some concerns regarding Sequence
:
That's true indeed. Ultimately, I think this isn't about infinity at all, but rather about "is it too large to fit in a computer", and this question has no clear answer.
Without the suffix-methods, it would be much less controversial that a Sequence
can have no end.
Luckily, I didn't claim to have a plan to resolve that one ;-) - but maybe the introduction of move-only types could be a opportunity to "fix" Sequence
?
No, I personally don't want Array.binarySearch
;-) - and I'm pretty sure that I don't need it, because it hasn't been there the last years.
I think it also wouldn't be consistent to allow arrayThatIsntSortedAtAll.binarySearch(element)
despite the fact how unhappy many people are that they can't do stringThatsReallyOnlyBoringASCII[5]
;-).
But I better stay out of this discussion, as I found someone who is way more qualified than me:
(-: just joking here - that message starts with the disclaimer that it's posted on behalf of others)