Actually, that's a pretty convincing argument. I've played with Lua before, and did get the feeling that 1-based index has some advantages (but couldn't articulate why).
Having the last position and the length be the same seems to fit the common intuition, like how children count: "What is the position of the last thing" and "How many things do we have?".
So it may make the language easier to learn. On the other hand, it may make the learner struggle to pick up most other languages which use 0-based index. I suppose it's been argued in depth on both sides..
Having the last index and the length be the same may not be the good thing. for instance, if you translate python's negative indices (x[-i] = x[len(x)-i]) directly the last element would be...x[-0]? But then having the last element be x[-1] in python is also not entirely obvious.
First position, last position, and length for an array of [1, 2, 3].
Actually, that's a pretty convincing argument. I've played with Lua before, and did get the feeling that 1-based index has some advantages (but couldn't articulate why).Having the last position and the length be the same seems to fit the common intuition, like how children count: "What is the position of the last thing" and "How many things do we have?".
So it may make the language easier to learn. On the other hand, it may make the learner struggle to pick up most other languages which use 0-based index. I suppose it's been argued in depth on both sides..