3 ms·
Djikstra does a good job of selling the virtues of 0-based indexing, but he doesn't give the same attention to the situations where 1-based indexing is better.
by ufo 6y ago
Djikstra does a good job of selling the virtues of 0-based indexing, but he doesn't give the same attention to the situations where 1-based indexing is better. That's the biggest problem I see in EWD831.
For example, if you need to iterate backwards then it is nicer if the interval is closed on both ends (as is the case with 1 based indexing). This way, iterating backwards is as clean as iterating forwards.