News for hackers. Stuff that matters.
Re:Why do arrays start at 0? by karamanolev on Wednesday August 24, 2022 @07:20PM (#32587192)
Counting fingers (or other items) isn't a positional numeral system, so it's really apples to oranges. Also, "first" has a meaning of "nothing precedes it", which is separate from the indexing system", it shouldn't mean "at index 1", unless otherwise specified.
Re:Why do arrays start at 0? by polyamid23 on Thursday August 25, 2022 @07:25AM (#32592232)
Though the idea of an index as a position instead of an address is weird to me, you can indeed make that analogy. The "first" element of an array has the index zero, as in "zero elements precede it".