Comment by Timwi
1 year ago
If you cut up a circle into n slices (maybe you're drawing a diagram on screen), it's vastly more helpful to think of one of the segments as segment 0 because then the start angle of every segment is index*360/n and the two segments whose border is at your initial angle are the first and last. If you start counting segments at 1, your “first” segment would be some way into the circle, and the two segments whose border is at your initial angle would be the last and the second-last.
Don't you see that what you're talking about is a range, not counting?? A range indeed starts at a zero point because if you don't have another point, you just have an empty range: and that's the equivalent of a zero range. When you have two points in a range, then the "first" point ends up being zero, that's correct, because it's being treated as the beginning of it. An "origin" is always associated with zero. It's perhaps incorrect to use the word "first" in this case exactly because it "breaks" how ordinals actually work (i.e. 1=first, 2=second, etc.). A better word is the "initial" point of a range, and the "other" point is the "final" point. Each segment you consider will be a pair [initial, final]. Here's where your mistake comes in: you assume that you can just take each segment and assign it a single number, but instead of using the ordinal numbers which start from 1, you decided to, arbitrarily, take the initial point of the range as your number instead, which is where the zero comes from. Notice that the zero you chose comes from the pair [initial, final], but the zero only makes sense when it's in a pair (alone, zero means the absence of something, i.e. there's no range... I thought that concept was well understood at least by fellow programmers, but apparently not).
I really don't see how your comment helps reduce complexity. It seems to me that you're introducing a new concept, “ranges”, just to maintain traditional 1-based ordinals, instead of realizing that when you count from 0, counting and ranges simply become the same thing and you don't need such a distinction.