News for hackers. Stuff that matters.
Re:Why do arrays start at 0? by yccs27 on Thursday August 25, 2022 @03:43AM (#32590806)
Yeah, offsets are just easier to mathematically manipulate than ordinals. It's not just pointer arithmetic where it matters that item i corresponds to start+i*step. Any time you want to convert between integer indices and general linearly-spaced values, 0-based indexing is more convenient.

There are no comments on this comment yet.