`Iterator::nth` is badly named

Yeah, “first” MEANS x[0]. The English word means the one without any before it, which makes it mean item 1 in 1-based counting and item 0 in 0-based counting. There just is no inconsistency there.

“Second” is from the Latin word for following. It means index 1 in 0-based counting. “Third” etc. do sound like the one-based indices. That’s annoying, but like, not that big a deal?

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.