tdenniston/bish

Bish for loop bounds are inclusive

tdenniston opened this issue · 2 comments

Currently, the following bish script:

for (i in 0 .. 10) {
    print("$i ");
}

will print all numbers from 0 to 10, inclusive. The usual behavior of ranges such as these is that the lower bound is inclusive, but the upper bound is exclusive. Bish should probably match this expectation.

Thanks for the pointer to that. I'm not sure how I feel about ..< as an operator though. I also like their compromise of no semicolons but explicit blocks with curly braces. Looks like I'll have to take a closer look at Swift to see what other ideas I can borrow.