2 ms·
I am pretty sure that the last, counterfactual, paragraph of this article is spot-on. Personally, I am not so much interested in which way is more right, but w
by mannykannot 6y ago
I am pretty sure that the last, counterfactual, paragraph of this article is spot-on.
Personally, I am not so much interested in which way is more right, but which way is less likely to result in off-by-one and related errors, though I do not know how you could gather data on that, other for people beginning programming, and any difference might go away or even flip as programmers gain experience and move on to more difficult problems. (Of course, the most effective solution is to not use indexing at all, except where absolutely necessary.)