2 ms·
Zero based indexing came from early requirements to address things in arrays using offsets. Subsequent languages don’t have this issue, and when you think abou
by FridgeSeal 6y ago
Zero based indexing came from early requirements to address things in arrays using offsets.
Subsequent languages don’t have this issue, and when you think about it, it causes a weird disconnect: 1-based indexing corresponds exactly with how you think about and see elements in a collection. 0 based indexing-despite how comfortable one gets with it requires additional arithmetic.
It’s a relic from the past, and unless you’re doing the very specific thing of indexing via offset instead of position, there’s no reason to hang onto this anachronism.