I actually agree with #2.
However, 0-based indexing goes beyond "people aren't used to it". Another poster here demonstrated some code where a 0-based index produces a simplier solution. Further, even if the average person isn't used to it, the practice is so widespread that the average programmer is used to it, and may even complain when a language does 1-based indexing.
Further, I seriously question the utility of even caring about 0-or-1-based indexes. Most of my code doesn't index arrays, but processes them as complete lists using foreach/map/grep/sort/etc., which do not require the use of indexes. In which case, it's a moot point.
"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.
| [reply] |
And if the counter-points are equally obvious to others, what then? Do you just argue back and forth: 0! No, 1! No, 0! You're all wrong, 1!
Do take the time to state your "obvious" arguments clearly. I know I was disappointed to not see clearly expressed counterarguments (though I only skimmed much of the mass of replies, so I may have missed some). I can't help but feel you set the tone in your original post. It's not too late to update it, though.
| [reply] |
Using the Wassercrats method of communication, I hereby summarize everything that is obvious: | [reply] |