[swift-evolution] [Proposal] Safer half-open range operator

Dave Abrahams dabrahams at apple.com
Thu Apr 14 12:00:45 CDT 2016

on Thu Apr 14 2016, "Vladimir.S" <svabox-AT-gmail.com> wrote:

> As I understand, currently Range <start> can not be greater than
> <end>. So we just can't use 0..<-2. And I don't think we should
> implement such thing as it is not very explicit about what we are
> expecting.
> On 14.04.2016 0:29, Dave Abrahams via swift-evolution wrote:
>> That approach makes sense too.  But then do we add
>>    x[python: 0..<-2] // all but the last two elements?
>> ;^)

I agree; I was half-joking.


More information about the swift-evolution mailing list