Following the reading of the question Why are zero-based arrays the norm?, I wonder about the terms to use for referring to specific array elements, in the perspective of linguistic reading of programming.
Should Array[1]
be called the first element of Array
or the second element? In the latter case, then how should the 0th element be referred to?
Array[0]
would be the "first". That's the only thing that makes sense to me. There's nozeroth
element. And in my humble but crude opinion, all languages that use 1-based array indexing are making things unnecessarily complicated, adding unnecessary complexity to the math that involves indexing arrays like treating them as circular buffers, requiring additions on top of modulo when zero-based array indexing could just simply use modulo. I can't think of any cases where 1-based indexing reduces the math required for indexing. – Dec 07 '17 at 09:24