|
|
|
|
|
by bobthepanda
347 days ago
|
|
I think that is from a time when popular programming languages varied in their behavior and also when people were writing for loops with incrementation all the time. A lot of languages have just settled on zero indexing, and many now have some variation of for/each or for/of that would eliminate a lot of potential ways to encounter this error. |
|
Occasionally, though, I need to use the same index across multiple items, there’s not a trivial means in which to zip, and at that point I have to use an old school for loop. That’s when the 1-index vs 0-index bites me.