News for hackers. Stuff that matters.
Re:Again on 0-based vs. 1-based indexing by user-the-name on Wednesday January 20, 2021 @07:06AM (#25845426)
This can happen, but it is fairly rare, especially if you favour handling ranges as either (start, length) tuples, or as half-open intervals, with the end index being one past the highest index. This representation simplifies many things, many of them unrelated to 0- or 1-based indexing.
Re:Again on 0-based vs. 1-based indexing by tsegers on Wednesday January 20, 2021 @07:17AM (#25845536)
While that is true, ranges and intervals are not native constructs in quite a few languages.