News for hackers. Stuff that matters.
Re:Again on 0-based vs. 1-based indexing by bvrmn on Wednesday January 20, 2021 @06:09AM (#25844990)
> with 1-based indexing lower is 1 and upper is one greater than the number of elements.

Do you see +1 tweak? Also consider that "for loop" can't be expressed as </* interval and always expressed as <=/* interval. So 1-based indexing have to be either 1 <= i <= N (closed interval, bad, N - 1 != number of iterations) or 1 <= i < N + 1 (half open interval, good, but +1 tweak).

There are no comments on this comment yet.